File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9797 * </div>
9898 * ```
9999 *
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+ *
100109 * # Special repeat start and end points
101110 * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending
102111 * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.
168177 * which can be used to associate the objects in the collection with the DOM elements. If no tracking expression
169178 * is specified, ng-repeat associates elements by identity. It is an error to have
170179 * 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.
173183 *
174184 * For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements
175185 * will be associated by item identity in the array.
You can’t perform that action at this time.
0 commit comments