src/sap.ui.core/src/sap/ui/core/Fragment.js
function(sTemplateName) {
			var sUrl = sap.ui.require.toUrl(sTemplateName.replace(/\./g, "/")) + ".fragment.html";
			var sHTML = _mHTMLTemplates[sUrl];
			var sResourceName;

			if (!sHTML) {
				sResourceName = sTemplateName.replace(/\./g, "/") + ".fragment.html";
				sHTML = LoaderExtensions.loadResource(sResourceName);
				// TODO discuss
				// a) why caching at all (more precise: why for HTML fragment although we refused to do it for other view/fragment types - risk of a memory leak!)
				// b) why cached via URL instead of via name? Any special scenario in mind?
				_mHTMLTemplates[sUrl] = sHTML;
			}
			return sHTML;
		}
function(sTemplateName) {
			var sUrl = sap.ui.require.toUrl(sTemplateName.replace(/\./g, "/")) + ".fragment.html";
			var sHTML = _mHTMLTemplates[sUrl];
			var sResourceName;

			if (!sHTML) {
				sResourceName = sTemplateName.replace(/\./g, "/") + ".fragment.html";
				sHTML = LoaderExtensions.loadResource(sResourceName);
				// TODO discuss
				// a) why caching at all (more precise: why for HTML fragment although we refused to do it for other view/fragment types - risk of a memory leak!)
				// b) why cached via URL instead of via name? Any special scenario in mind?
				_mHTMLTemplates[sUrl] = sHTML;
			}
			return sHTML;
		}
function ( sTemplateName ) { var sUrl = sap . ui . require . toUrl ( sTemplateName . replace ( / \. / g , "/" ) ) + ".fragment.html" ; var sHTML = _mHTMLTemplates [ sUrl ] ; var sResourceName ; if ( ! sHTML ) { sResourceName = sTemplateName . replace ( / \. / g , "/" ) + ".fragment.html" ; sHTML = LoaderExtensions . loadResource ( sResourceName ) ; // TODO discuss // a) why caching at all (more precise: why for HTML fragment although we refused to do it for other view/fragment types - risk of a memory leak!) // b) why cached via URL instead of via name? Any special scenario in mind? _mHTMLTemplates [ sUrl ] = sHTML ; } return sHTML ; }
Loads and returns a template for the given template name. Templates are only loaded once.

@param {string} sTemplateName The name of the template
@return {string} the template data
@private
Loads and returns a template for the given template name . Templates are only loaded once .