From 3fe4491a6bf57ddeb312b8a30cf1706f6f1d2355 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 7 Nov 2013 00:24:07 -0800 Subject: fix($compile): correct isolate scope distribution to controllers Fixes an issue when we didn't share the isolate scope with the controller of the directive from the isolate directive's template when this directive was replaced onto the isolate directive element. --- test/ng/compileSpec.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test/ng/compileSpec.js') diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index 75c111d7..356b1796 100755 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -2480,6 +2480,30 @@ describe('$compile', function() { }); + it('should give the isolate scope to the controller of another replaced directives in the template', function() { + module(function() { + directive('testDirective', function() { + return { + replace: true, + restrict: 'E', + scope: {}, + template: '' + }; + }); + }); + + inject(function($rootScope) { + compile('