aboutsummaryrefslogtreecommitdiffstats
path: root/src/directives.js
diff options
context:
space:
mode:
authorVojta Jina2012-01-20 14:04:53 -0800
committerVojta Jina2012-01-23 13:11:12 -0800
commitdbffbefb7cd7af2ac063c95378a035aa9fbbd2ff (patch)
tree047f7ae83c0573e1f1c22c44cba7644a1ab464b1 /src/directives.js
parent0196411dbe179afe24f4faa6d6503ff3f69472da (diff)
downloadangular.js-dbffbefb7cd7af2ac063c95378a035aa9fbbd2ff.tar.bz2
refactor($controller): Add $controller service for instantiating controllers
So that we can allow user to override this service and use BC hack: https://gist.github.com/1649788
Diffstat (limited to 'src/directives.js')
-rw-r--r--src/directives.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/directives.js b/src/directives.js
index 61bb6139..e9b678f8 100644
--- a/src/directives.js
+++ b/src/directives.js
@@ -160,12 +160,12 @@ angularDirective("ng:init", function(expression){
*/
angularDirective("ng:controller", function(expression) {
this.scope(true);
- return ['$injector', '$window', function($injector, $window) {
+ return ['$controller', '$window', function($controller, $window) {
var scope = this,
Controller = getter(scope, expression, true) || getter($window, expression, true);
assertArgFn(Controller, expression);
- $injector.instantiate(Controller, {$scope: scope});
+ $controller(Controller, scope);
}];
});