AngularJS Developer Question:

Download Job Interview Questions and Answers PDF

What is orderby filter?

AngularJS Developer Interview Question
AngularJS Developer Interview Question

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 Interview Questions And Answers PDF

Previous QuestionNext Question
What is ng-repeat directive?Tell me how angular.module works?