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

@Narretz Narretz added this to the 1.5.x - migration-facilitation milestone Jan 5, 2016
@Narretz Narretz force-pushed the fix-compile-bindtocontroller branch from 1bb2564 to cf6861a Compare January 5, 2016 18:38
Narretz added a commit to Narretz/angular.js that referenced this pull request Jan 5, 2016
@petebacondarwin
Copy link
Contributor

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.

@Narretz Narretz force-pushed the fix-compile-bindtocontroller branch from cf6861a to c1e140a Compare January 6, 2016 14:59
@Narretz Narretz closed this in 495d40d Jan 6, 2016
Narretz added a commit that referenced this pull request Jan 6, 2016
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.

4 participants