In AngularJS ngRoute module is used to make a page as an Single Page Application.
This attribute Routes the application to any different page without any reloading the entire application.
If any User has to navigate to different page and it should be an SPA(Single Page Application) then the best way to use is an ngRoute module.
Routing can be done from one page to other page as such Here is an example provided.
Example:
< body ng-app="app" >In Order to make our application ready for outing one have to include AngularJS Route Module .
Every Application needs an container which is provided by routing.
There are many ways of representing an ng-view directive in an Application.
Example:
< div ng-view >With this attribute $routeProvider user can define which page to be displayed when user clicks an links.
Example:
var app = angular.module('app',["ngRoute" ])With a $routeProvider we can define a controller for each and every view .
Example:
var app = angular.module('app',["ngRoute" ])