AngularJS Interview Questions

31. Explain $routeProvider in AngularJS?
$routeProvider is the key service which set the configuration of urls, maps them with the corresponding html page or ng-template, and attaches a controller with the same.

32. Explain orderby filter.
orderby filter orders the array based on provided criteria.
In below example, to order subjects by marks, we’ve used orderBy marks.

Salary:
<ul>
<li>{{ salary.name +’ ,grade:’ + subject.grade }}</li>
</ul>

COPY CODE SNIPPET