AngularJS Developer Question:

What is orderby filter?

Tweet Share WhatsApp

Answer:

orderby filter orders the array based on provided criteria.

In below example, to order subjects by marks, we've used orderBy marks.

Subject:
<ul>
<li ng-repeat = "subject in student.subjects | orderBy:'marks'">
{{ subject.name + ', marks:' + subject.marks }}
</li>
</ul>

Download AngularJS Developer PDF Read All 125 AngularJS Developer Questions
Previous QuestionNext Question
What is ng-repeat directive?Tell me how angular.module works?