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

docs($compile): add docs for bindToController with object hash #13681

Closed
wants to merge 1 commit into from

Conversation

Narretz
Copy link
Contributor

@Narretz Narretz commented Jan 5, 2016

Closes #13228
Closes #13625

@petebacondarwin
Copy link
Member

We can add the bit about bound properties being available in a later commit. This particular PR LGTM right now.

* When an isolate scope is used for a component (see above), and `controllerAs` is used, `bindToController: true` will
* This property can be used to bind scope properties directly to the controller. It can be either
* `true` or an object hash with the same format as the `scope` property. Additionally,
* `controllerAs` must be used for it to work.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it sound like the controllerAs property must be used (which is not the case).
To avoid confusion, I would re-phrase this to make it clear that a controller alias must be specified (either using controllerAs or controller: '... as ...').

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants