mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-22 01:10:23 +00:00
docs(ngInit): note precedence when used with filters
Clears up expression priority issue Closes #3869 Closes #5873
This commit is contained in:
parent
1028cfaa30
commit
42ec95ebae
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue