1.

What is the importance of orderBy?

Answer»

orderBy is a built-in filter in ANGULARJS that HELPS to re-order the array items based on defined CRITERIA. For example, if we need to sort the items based on the ascending order of price, then we can follow the below code:

<UL><li ng-repeat = "item in items | orderBy:'price"> {{ item.name + ', price:' + item.price }}</li></ul>


Discussion

No Comment Found