Skip to content

Commit fa0d8c4

Browse files
HenriqueLimaspetebacondarwin
authored andcommitted
docs($controller): mention "controller as" syntax
Closes angular#10011
1 parent 7e233eb commit fa0d8c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ng/controller.js

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ function $ControllerProvider() {
5959
* * if $controllerProvider#allowGlobals, check `window[constructor]` on the global
6060
* `window` object (not recommended)
6161
*
62+
* The string can use the `controller as property` syntax, where the controller instance is published
63+
* as the specified property on the `scope`; the `scope` must be injected into `locals` param for this
64+
* to work correctly.
65+
*
6266
* @param {Object} locals Injection locals for Controller.
6367
* @return {Object} Instance of given controller.
6468
*

0 commit comments

Comments
 (0)