From c47abd0dd7490576f4b84ee51ebaca385c1036da Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Wed, 20 Nov 2013 11:04:38 -0800 Subject: fix(ngInclude): allow ngInclude to load scripts when jQuery is included In 1.2, the behavior of ngInclude was modified to use DOM APIs rather than jqLite. This means that even when jQuery was loaded, ngInclude was not calling into it, and thus scripts were not eval'd as they had been before. Although the use of ngInclude to eval scripts as a lazy-loading strategy was never an intentional feature, this patch restores the ability to do so. Closes #3756 --- test/ng/directive/ngIncludeSpec.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'test/ng/directive') diff --git a/test/ng/directive/ngIncludeSpec.js b/test/ng/directive/ngIncludeSpec.js index aba71e44..59f8b4ae 100644 --- a/test/ng/directive/ngIncludeSpec.js +++ b/test/ng/directive/ngIncludeSpec.js @@ -312,6 +312,31 @@ describe('ngInclude', function() { })); + it('should exec scripts when jQuery is included', inject(function($compile, $rootScope, $httpBackend) { + if (!jQuery) { + return; + } + + element = $compile('