docs(ngInit): note precedence when used with filters

Clears up expression priority issue

Closes #3869
Closes #5873
This commit is contained in:
Chia-liang Kao 2014-01-18 23:01:20 +08:00 committed by Caitlin Potter
parent 1028cfaa30
commit 42ec95ebae

View file

@ -15,6 +15,13 @@
* should use {@link guide/controller controllers} rather than `ngInit`
* to initialize values on a scope.
* </div>
* <div class="alert alert-warning">
* **Note**: If you have assignment in `ngInit` along with {@link api/ng.$filter `$filter`}, make
* sure you have parenthesis for correct precedence:
* <pre class="prettyprint">
* <ng-init="test1 = (data | orderBy:'name')">
* </pre>
* </div>
*
* @priority 450
*