TutorialLesson 24Free preview
AngularJS Routing
This lesson is part of AngularJS · All levels
Summary
Routing allows AngularJS applications to change the view based on the URL without reloading the page. The ngRoute module provides ng-view as a template container, and the $routeProvider sets the route to the template along with its controller. This pattern is a hallmark of the single page application generation of AngularJS.
Key points
- The ngRoute module must be added as a dependence
- $routeProvider sets the path to the template and controller
- Ng-view is an active route template rendering container
- The ng-view and ng-href directives help navigate between routes
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.