File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 212
212
*
213
213
*
214
214
* #### `bindToController`
215
- * When an isolate scope is used for a component (see above), and `controllerAs` is used, `bindToController: true` will
215
+ * This property can be used to bind scope properties directly to the controller. It can be either
216
+ * `true` or an object hash with the same format as the `scope` property. Additionally,
217
+ * `controllerAs` must be used for it to work.
218
+ *
219
+ * When an isolate scope is used for a component (see above), `bindToController: true` will
216
220
* allow a component to have its properties bound to the controller, rather than to scope. When the controller
217
221
* is instantiated, the initial values of the isolate scope bindings are already available.
218
222
*
223
+ * It is also possible to set `bindToController` to an object hash with the same format as the `scope` property.
224
+ * This will set up the scope bindings to the controller directly. Note that `scope` can still be used
225
+ * to define which kind of scope is created. By default, no scope is created. Use `{}` to create an isolate
226
+ * scope (useful for component directives).
227
+ *
228
+ * If both `bindToController` and `scope` are defined and have object hashes, `bindToController` overrides `scope`.
229
+ *
230
+ *
219
231
* #### `controller`
220
232
* Controller constructor function. The controller is instantiated before the
221
233
* pre-linking phase and can be accessed by other directives (see
You can’t perform that action at this time.
0 commit comments