(function() { "use strict"; angular.module('shared') .config(['$provide', function ($provide) { $provide.decorator('$templateRequest', ['$delegate', 'BuildTag', function $templateRequestBuildNumberDecorator($delegate, BuildTag) { var trailingHtml = /\.html$/; function buildAnnotatedTemplateRequest(tpl, ignoreRequestError) { return $delegate(annotateTemplate(tpl), ignoreRequestError); } function annotateTemplate(template) { return template.replace(trailingHtml, BuildTag + '.html'); } Object.defineProperty(buildAnnotatedTemplateRequest, "totalPendingRequests", {get: function() { return $delegate.totalPendingRequests; }}); return BuildTag ? buildAnnotatedTemplateRequest : $delegate; }]); }]) })();