Skip to content

Commit 0559652

Browse files
roylingIgorMinar
authored andcommitted
docs($filter): fix wrong param order in doc
fix wrong param order in doc for filter comparator doc function param for filter expression Closes angular#5365 Closes angular#5611
1 parent 5fea347 commit 0559652

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ng/filter/filter.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@
2525
* property of the object. That's equivalent to the simple substring match with a `string`
2626
* as described above.
2727
*
28-
* - `function`: A predicate function can be used to write arbitrary filters. The function is
28+
* - `function(value)`: A predicate function can be used to write arbitrary filters. The function is
2929
* called for each element of `array`. The final result is an array of those elements that
3030
* the predicate returned true for.
3131
*
32-
* @param {function(expected, actual)|true|undefined} comparator Comparator which is used in
32+
* @param {function(actual, expected)|true|undefined} comparator Comparator which is used in
3333
* determining if the expected value (from the filter expression) and actual value (from
3434
* the object in the array) should be considered a match.
3535
*
3636
* Can be one of:
3737
*
38-
* - `function(expected, actual)`:
38+
* - `function(actual, expected)`:
3939
* The function will be given the object value and the predicate value to compare and
4040
* should return true if the item should be included in filtered result.
4141
*
42-
* - `true`: A shorthand for `function(expected, actual) { return angular.equals(expected, actual)}`.
42+
* - `true`: A shorthand for `function(actual, expected) { return angular.equals(expected, actual)}`.
4343
* this is essentially strict comparison of expected and actual.
4444
*
4545
* - `false|undefined`: A short hand for a function which will look for a substring match in case

0 commit comments

Comments
 (0)