docs(ngInit): note precedence when used with filters
Clears up expression priority issue Closes #3869 Closes #5873
This commit is contained in:
committed by
Caitlin Potter
parent
1028cfaa30
commit
42ec95ebae
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user