Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix($compile):remove controllerAs requirement #15106

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/ng/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1029,17 +1029,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
if (isObject(bindings.bindToController)) {
var controller = directive.controller;
var controllerAs = directive.controllerAs;
if (!controller) {
// There is no controller, there may or may not be a controllerAs property
throw $compileMinErr('noctrl',
'Cannot bind to controller without directive \'{0}\'s controller.',
directiveName);
} else if (!identifierForController(controller, controllerAs)) {
// There is a controller, but no identifier or controllerAs property
throw $compileMinErr('noident',
'Cannot bind to controller without identifier for directive \'{0}\'.',
directiveName);
}
}
return bindings;
Expand Down
Loading