Describe how to implement routing in AngularJS.
Instruction: Explain the steps to set up basic routing in an AngularJS application.
Context: This question assesses the candidate's familiarity with the AngularJS routing mechanism, necessary for building SPA (Single Page Applications), and their ability to implement it.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
For a legacy AngularJS 1.8.3 application using ngRoute, load matching AngularJS and angular-route scripts, declare ngRoute as a module dependency, configure routes and provide an ng-view outlet. Routing changes the client view; it does not authorize access to server data.
This complete page assumes the two reviewed 1.8.3 files are served at vendor/angular.js and vendor/angular-route.js. It uses an explicit !...