Skip to content

Commit 2cebe73

Browse files
committed
fix(README): first example
1 parent d8d4587 commit 2cebe73

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff 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
283284
Gets 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">

0 commit comments

Comments
 (0)