aboutsummaryrefslogtreecommitdiffstats
path: root/src/directives.js
diff options
context:
space:
mode:
authorMisko Hevery2010-10-06 17:01:41 -0700
committerMisko Hevery2010-10-08 16:23:26 -0700
commit772e32c220193f026c6f4b4674b44ab915e6f0f0 (patch)
tree83620adb4d35c0ce63d4cf4d1a92e30a1d59eabd /src/directives.js
parentc30807d1413ea9942bcb065a02997082bf4291aa (diff)
downloadangular.js-772e32c220193f026c6f4b4674b44ab915e6f0f0.tar.bz2
change ng:controller to create new scope hence allow nesting
Diffstat (limited to 'src/directives.js')
-rw-r--r--src/directives.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/directives.js b/src/directives.js
index d2d3bf2c..425685f3 100644
--- a/src/directives.js
+++ b/src/directives.js
@@ -5,6 +5,7 @@ angularDirective("ng:init", function(expression){
});
angularDirective("ng:controller", function(expression){
+ this.scope(true);
return function(element){
var controller = getter(window, expression, true) || getter(this, expression, true);
if (!controller)
@@ -12,7 +13,6 @@ angularDirective("ng:controller", function(expression){
if (!isFunction(controller))
throw "Reference '"+expression+"' is not a class.";
this.$become(controller);
- (this.init || noop)();
};
});