| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -101,9 +101,16 @@ var minifyHtml = function(html) { | |||
| 101 | 101 | }); | |
| 102 | 102 | }; | |
| 103 | 103 | ||
| 104 | - function wrapAngularTemplate(id, contents) { | ||
| 105 | - return "angular.module('angular-templates').run(['$templateCache', function($templateCache) { $templateCache.put('" + | ||
| 106 | - id + "'," + JSON.stringify(contents) + ");}]);"; | ||
| 104 | + function wrapAngularTemplate(templateUrl, contents) { | ||
| 105 | + return ` | ||
| 106 | + angular.module('angular-templates') | ||
| 107 | + .run(['$templateCache', function($templateCache) { | ||
| 108 | + $templateCache.put('${templateUrl}', ${JSON.stringify(contents)}); | ||
| 109 | + }]); | ||
| 110 | + if (typeof module !== 'undefined' && module.exports) { | ||
| 111 | + module.exports = "${templateUrl}"; | ||
| 112 | + } | ||
| 113 | + `; | ||
| 107 | 114 | } | |
| 108 | 115 | ||
| 109 | 116 | StaticHtmlTagHandler.init = function(tags) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments