diff --git a/src/ng/filter/orderBy.js b/src/ng/filter/orderBy.js index 58b4c4bcd3e9..6df6906a47ec 100644 --- a/src/ng/filter/orderBy.js +++ b/src/ng/filter/orderBy.js @@ -34,6 +34,41 @@ * @param {boolean=} reverse Reverse the order of the array. * @returns {Array} Sorted copy of the source array. * + * To make AngularJS perform a sort, add orderBy to the ng-repeat. + * The example below demonstrates setting the predicate to '-age' and reverse * to false. + * + * @example + + + +
+ + + + + + + + + + + +
NamePhone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+
+
+ * The predicate and reverse parameters can be controlled dynamically through variables, + * as shown in the next example. * @example