From 0c399bc546b9d62b96cfe30678c464aa69426a5d Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 9 Aug 2013 09:54:17 -0700 Subject: chore($compile): remove bogus scope/controller check We already have the same test in $controller which is called just a few lines above Closes #3517 --- src/ng/compile.js | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src') diff --git a/src/ng/compile.js b/src/ng/compile.js index 39d3338f..59754ee3 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -1035,11 +1035,6 @@ function $CompileProvider($provide) { '$' + directive.name + 'Controller', controllerInstance); if (directive.controllerAs) { - if (typeof locals.$scope !== 'object') { - throw new Error('Can not export controller as "' + directive.controllerAs + '". ' + - 'No scope object provided!'); - } - locals.$scope[directive.controllerAs] = controllerInstance; } }); -- cgit v1.2.3