From e2b1d9e994e50bcd01d237302a3357bc7ebb6fa5 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 24 Jan 2012 22:42:33 -0800 Subject: feat(scriptTemplateLoader): provide template inlining populates $templateCache with content of ng-template scripts --- test/widgetsSpec.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test') diff --git a/test/widgetsSpec.js b/test/widgetsSpec.js index 6e115a36..53766274 100644 --- a/test/widgetsSpec.js +++ b/test/widgetsSpec.js @@ -931,4 +931,22 @@ describe('widget', function() { })); }); }); + + + describe('scriptTemplateLoader', function() { + it('should populate $templateCache with contents of a ng-template script element', inject( + function($compile, $templateCache) { + if (msie <=8) return; + // in ie8 it is not possible to create a script tag with the right content. + // it always comes up as empty. I was trying to set the text of the + // script tag, but that did not work either, so I gave up. + $compile('