File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -270,14 +270,15 @@ Mike
270270-->
271271
272272```
273+ Return the first two users with even id
273274``` html
274275<!-- collection | first: n: expression -->
275276<th ng-repeat =" user in users | first: 2: '!(id%2)'" >
276277 {{ user.name }}
277278</th >
278279<!-- result:
279- baz
280- lol
280+ Mike
281+ Rob
281282```
282283###last
283284Gets the last element or last n elements of a collection,<br/>
@@ -296,14 +297,12 @@ $scope.users = [
296297<!-- result:
297298{ id: 4, name: { first: 'lol', last: 'bar' } }
298299```
299-
300300```html
301301<!-- collection | last: expression -->
302302{{ users | last: 'name.last === \'bar\'' }}
303303<!-- result:
304304[ { id: 4, name: { first: 'lol', last: 'bar' } } ]
305305```
306-
307306```html
308307<!-- collection | last: n -->
309308<th ng-repeat =" user in users | last: 2" >
You can’t perform that action at this time.
0 commit comments