Skip to content

Commit 586f2e4

Browse files
author
Boris Litvinsky
committed
Set $ctrl as default controllerAs param and removed option to configure scope (set it isolated by default).
All this in order to be complient with latest changes to angular 1.5: angular/angular.js#13710
1 parent 47d5dcc commit 586f2e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/angular-component.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737

3838
return {
3939
controller: options.controller || angular.noop,
40-
controllerAs: identifierForController(options.controller) || options.controllerAs || name,
40+
controllerAs: identifierForController(options.controller) || options.controllerAs || '$ctrl',
4141
template: makeInjectable(
4242
!options.template && !options.templateUrl ? '' : options.template
4343
),
4444
templateUrl: makeInjectable(options.templateUrl),
4545
transclude: options.transclude === undefined ? true : options.transclude,
46-
scope: (options.isolate === false ? true : (options.bindings || {})),
46+
scope: {},
4747
bindToController: !!options.bindings,
4848
restrict: options.restrict || 'E'
4949
};

0 commit comments

Comments
 (0)