Closed mrichard closed 8 years ago
Hey, I'm not 100% sure what you mean. It sets $ctrl
as the default, but you can set your own using something like:
{
...
controller: 'MyDirectiveController as name'
...
}
And then ng-click="name.foo()"
for example in the templates.
Not sure if this is the latest code, but here the default is the name parameter passed into the component definition.
Yep this is from October 2015, check this source: https://code.angularjs.org/1.5.0/angular.js
Search for this.component = function registerComponent(name, options) {
And then this piece:
controllerAs: identifierForController(options.controller) || options.controllerAs || '$ctrl',
First thanks for putting this together.
One issue, should the controllerAs property setting reference name in the last OR clause? Instead of '$ctrl'.