From 649b892205615a144dafff9984c0e6ab10ed341d Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Wed, 23 Jan 2013 00:01:13 -0500 Subject: feat(Scope): expose transcluded and isolate scope info for batarang test($compile): add test for exposing transclude and isolate scope info to batarang --- src/ng/compile.js | 3 +++ src/ng/rootScope.js | 1 + test/ng/compileSpec.js | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/src/ng/compile.js b/src/ng/compile.js index 84d53e6d..13f8ae7e 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -420,6 +420,7 @@ function $CompileProvider($provide) { (function(transcludeFn) { return function(cloneFn) { var transcludeScope = scope.$new(); + transcludeScope.$$transcluded = true; return transcludeFn(transcludeScope, cloneFn). bind('$destroy', bind(transcludeScope, transcludeScope.$destroy)); @@ -725,6 +726,8 @@ function $CompileProvider($provide) { lastValue, parentGet, parentSet; + scope.$$isolateBindings[scopeName] = mode + attrName; + switch (mode) { case '@': { diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js index 9be37b9f..549517b6 100644 --- a/src/ng/rootScope.js +++ b/src/ng/rootScope.js @@ -137,6 +137,7 @@ function $RootScopeProvider(){ this.$$destroyed = false; this.$$asyncQueue = []; this.$$listeners = {}; + this.$$isolateBindings = {}; } /** diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index 363b4329..b4ec0292 100644 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -1938,6 +1938,21 @@ describe('$compile', function() { compile('