Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(ngInit): note precedence when used with filters #5873

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/ng/directive/ngInit.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
* should use {@link guide/controller controllers} rather than `ngInit`
* to initialize values on a scope.
* </div>
* <div class="alert alert-error">
* *Caveat*: 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
*
Expand Down