module provides routing and deeplinking services and directives for angular apps.
|Directive||ngView is a directive that complements the |
$route service by including the rendered template of the current route into the main layout (index.html) file. Every time the current route changes, the included view changes with it according to the configuration of the
|Provider||Used for configuring routes.|
$route is used for deep-linking URLs to controllers and views (HTML partials). It watches
$location.url() and tries to map the path to an existing route definition.
$routeParams service allows you to retrieve the current set of route parameters.
|Directive||The directive is used to create an html view using script tag. It contains "id" attribute which is used by |
$routeProvider to map a view with a controller.
Define a script block with type as
within the main module.
<div ng-app = "mainApp">
<script type = "text/ng-template" id = "addStudent.htm">
<h2> Add Student </h2>