mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-08 23:04:45 +00:00
fix the angular.Array.orderBy example + add docs
This commit is contained in:
parent
eea7113abe
commit
f60b6b0938
1 changed files with 2 additions and 2 deletions
|
|
@ -533,7 +533,7 @@ var angularArray = {
|
||||||
* - `Array`: array of function or string predicates, such that a first predicate in the array
|
* - `Array`: array of function or string predicates, such that a first predicate in the array
|
||||||
* is used for sorting, but when the items are equivalent next predicate is used.
|
* is used for sorting, but when the items are equivalent next predicate is used.
|
||||||
*
|
*
|
||||||
* @param {boolean=} descend TODO
|
* @param {boolean=} reverse Reverse the order the array.
|
||||||
* @returns {Array} Sorted copy of the source array.
|
* @returns {Array} Sorted copy of the source array.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
|
|
@ -554,7 +554,7 @@ var angularArray = {
|
||||||
<th><a href="" ng:click="predicate = 'age'">Age</a>
|
<th><a href="" ng:click="predicate = 'age'">Age</a>
|
||||||
(<a href ng:click="predicate = '-age'">^</a>)</th>
|
(<a href ng:click="predicate = '-age'">^</a>)</th>
|
||||||
<tr>
|
<tr>
|
||||||
<tr ng:repeat="friend in friends.$orderBy(predicate, true)">
|
<tr ng:repeat="friend in friends.$orderBy(predicate)">
|
||||||
<td>{{friend.name}}</td>
|
<td>{{friend.name}}</td>
|
||||||
<td>{{friend.phone}}</td>
|
<td>{{friend.phone}}</td>
|
||||||
<td>{{friend.age}}</td>
|
<td>{{friend.age}}</td>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue