aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng
diff options
context:
space:
mode:
authorChia-liang Kao2014-01-18 23:01:20 +0800
committerCaitlin Potter2014-01-18 15:35:33 -0500
commit42ec95ebae716c81087684b55ed8fa8c13888abc (patch)
treed9b49e8986fb176fa2aa9eb5a256d9e2bf01713b /src/ng
parent1028cfaa305550d3ea414cf68515e7b4bb05af93 (diff)
downloadangular.js-42ec95ebae716c81087684b55ed8fa8c13888abc.tar.bz2
docs(ngInit): note precedence when used with filters
Clears up expression priority issue Closes #3869 Closes #5873
Diffstat (limited to 'src/ng')
-rw-r--r--src/ng/directive/ngInit.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ng/directive/ngInit.js b/src/ng/directive/ngInit.js
index b09fad2a..5d1f2f8a 100644
--- a/src/ng/directive/ngInit.js
+++ b/src/ng/directive/ngInit.js
@@ -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
*