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
This commit is contained in:
Igor Minar 2013-08-09 09:54:17 -07:00
parent a207665dad
commit 0c399bc546

View file

@ -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;
}
});