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

Controller argument description in directive link function documentation is wrong #10815

Closed
@dorellang

Description

@dorellang

The docs say in the link function argument list (https://docs.angularjs.org/api/ng/service/$compile)

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions