You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
controller - a controller instance - A controller instance if at least one directive on the element defines a controller. The controller is shared among all the directives, which allows the directives to use the controllers as a communication channel.
But this is not true as of version 1.3.x. Currently the value of this argument depends on whether the directive require list has been defined; if it has, then controller is actually a list in which the i-th value is the controller instance of the i-th directive in the require list. Else, controller is just the directive's controller instance (or undefined if it doesn't have one).
Probably I should have sent a PR or something with the correction, but since my English kind of sucks I haven't.
The text was updated successfully, but these errors were encountered:
Yeah, that's true:
One correction to your correction:
If you use require: 'ngModel'
then controller is not an array. It's only an array if require is an array.
The docs say in the link function argument list (https://docs.angularjs.org/api/ng/service/$compile)
But this is not true as of version 1.3.x. Currently the value of this argument depends on whether the directive
require
list has been defined; if it has, thencontroller
is actually a list in which the i-th value is the controller instance of the i-th directive in therequire
list. Else,controller
is just the directive's controller instance (orundefined
if it doesn't have one).Probably I should have sent a PR or something with the correction, but since my English kind of sucks I haven't.
The text was updated successfully, but these errors were encountered: