@@ -135,7 +135,7 @@ When you're done, your setup should look similar to the following:
135
135
136
136
## Collection
137
137
138
- ###concat
138
+ ### concat
139
139
140
140
Concatenates an array/object into another one.
141
141
@@ -170,7 +170,7 @@ result:
170
170
-->
171
171
```
172
172
173
- ###unique
173
+ ### unique
174
174
Remove duplicates from an array/object.<br />
175
175
If a string is provided, it will filter out duplicates using the provided expression.<br />
176
176
** Usage:** ``` collection | unique: 'property' ``` <br />
@@ -200,7 +200,7 @@ William 20
200
200
Clive 30
201
201
202
202
```
203
- ###filterBy
203
+ ### filterBy
204
204
Filter a collection by a specific property.<br/>
205
205
**Usage:** ```collection | filterBy: [prop, nested.prop, etc..]: search: strict[optional]```<br/>
206
206
**Note:** You can even use compound properties (e.g: ```|filterBy: [property + property]: model```)<br/>
@@ -247,7 +247,7 @@ Return users whose full name is
247
247
3: Rob Johannson
248
248
-->
249
249
```
250
- ###first
250
+ ### first
251
251
Gets the first element(s) of a collection.<br />
252
252
If an expression is provided, it will only return elements whose expression is truthy.<br />
253
253
*** Usage:*** See below <br />
@@ -299,7 +299,7 @@ Return the first two users with even id
299
299
Mike
300
300
Rob
301
301
```
302
- ###last
302
+ ### last
303
303
Gets the last element or last n elements of a collection,<br/>
304
304
if expression is provided, is returns as long the expression return truthy<br/>
305
305
***Usage:*** See below <br/>
340
340
baz
341
341
lol
342
342
```
343
- ###flatten
343
+ ### flatten
344
344
Flattens a nested array (the nesting can be to any depth).<br/>
345
345
If you pass shallow, the array will only be flattened a single level<br/>
346
346
**Usage:** ```collection | flatten: shallow[optional]```
@@ -374,7 +374,7 @@ $scope.names = ['John', 'Sebastian', 'Will', 'James'];
374
374
```
375
375
376
376
377
- ###fuzzy
377
+ ### fuzzy
378
378
fuzzy string searching(approximate string matching). [ Read more] ( http://en.wikipedia.org/wiki/Approximate_string_matching ) <br />
379
379
** note:** use fuzzyBy to filter by one property to improve performance<br />
380
380
** Usage:** ``` collection | fuzzy: search: caseSensitive[optional] ```
@@ -397,7 +397,7 @@ $scope.books = [
397
397
{{ book.title }}
398
398
</li >
399
399
```
400
- ###fuzzyBy
400
+ ### fuzzyBy
401
401
fuzzy string searching(approximate string matching) by property(nested to). [ Read more] ( http://en.wikipedia.org/wiki/Approximate_string_matching ) <br />
402
402
** Usage:** ``` collection | fuzzyBy: 'property': search: caseSensitive[optional] ```
403
403
``` js
@@ -419,7 +419,7 @@ $scope.books = [
419
419
{{ book.title }}
420
420
</li >
421
421
```
422
- ###groupBy
422
+ ### groupBy
423
423
Create an object composed of keys generated from the result of running each element of a collection,<br />
424
424
each key is an array of the elements.<br />
425
425
** Usage:** ``` (key, value) in collection | groupBy: 'property' ``` or ``` ... | groupBy: 'nested.property' ```
@@ -453,7 +453,7 @@ $scope.players = [
453
453
* player: Steve
454
454
* player: Scruath
455
455
```
456
- ###countBy
456
+ ### countBy
457
457
Create an object composed of keys generated from the result of running each element of a collection,<br/>
458
458
each key is the count of objects in each group<br/>
459
459
**Usage:** ```(key, value) in collection | countBy: 'property'``` or ```... | countBy: 'nested.property'```
@@ -475,7 +475,7 @@ $scope.players = [
475
475
Group name: beta, length: 2
476
476
Group name: gamma, length: 2
477
477
```
478
- ###chunkBy
478
+ ### chunkBy
479
479
Collect data into fixed-length chunks or blocks
480
480
**Usage:** ```(key, value) in collection | chunkBy: 'n': fill-value(optional)```
481
481
```js
@@ -499,7 +499,7 @@ $scope.array = [1, 2, 3, 4, 5, 6];
499
499
Block: [5, 6, 0, 0]
500
500
```
501
501
502
- ###defaults
502
+ ### defaults
503
503
`defaultsFilter` allows to specify a default fallback value for properties that resolve to undefined.<br/>
504
504
**Usage:** `col in collection | defaults: fallback`
505
505
```js
@@ -539,7 +539,7 @@ $scope.ordersWithFallback = angular.copy($scope.orders);
539
539
<!-- ..... -->
540
540
</li >
541
541
```
542
- ###where
542
+ ### where
543
543
comparison for each element in a collection to the given properties object,<br />
544
544
returning an array of all elements that have equivalent property values.
545
545
``` js
0 commit comments