File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 97
97
* </div>
98
98
* ```
99
99
*
100
+ * <div class="alert alert-warning">
101
+ * **Note:** `track by` must always be the last expression:
102
+ * </div>
103
+ * ```
104
+ * <div ng-repeat="model in collection | orderBy: 'id' as filtered_result track by model.id">
105
+ * {{model.name}}
106
+ * </div>
107
+ * ```
108
+ *
100
109
* # Special repeat start and end points
101
110
* To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending
102
111
* the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.
168
177
* which can be used to associate the objects in the collection with the DOM elements. If no tracking expression
169
178
* is specified, ng-repeat associates elements by identity. It is an error to have
170
179
* more than one tracking expression value resolve to the same key. (This would mean that two distinct objects are
171
- * mapped to the same DOM element, which is not possible.) If filters are used in the expression, they should be
172
- * applied before the tracking expression.
180
+ * mapped to the same DOM element, which is not possible.)
181
+ *
182
+ * Note that the tracking expression must come last, after any filters, and the alias expression.
173
183
*
174
184
* For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements
175
185
* will be associated by item identity in the array.
You can’t perform that action at this time.
0 commit comments