diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ng/directive/script.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ng/directive/script.js b/src/ng/directive/script.js index dcbd97b1..79f8b26e 100644 --- a/src/ng/directive/script.js +++ b/src/ng/directive/script.js @@ -35,8 +35,11 @@ var scriptDirective = ['$templateCache', function($templateCache) { terminal: true, compile: function(element, attr) { if (attr.type == 'text/ng-template') { - var templateUrl = attr.id; - $templateCache.put(templateUrl, element.text()); + var templateUrl = attr.id, + // IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent + text = element[0].text; + + $templateCache.put(templateUrl, text); } } }; |
