<div ng-app = "myApp">
...
<div ng-view></div>
</div>
<h1>Department</h1>
<ul>
<li ng-repeat="dpt in department">
{{dpt}}
</li>
</ul>
/// <reference path="angular.js" />
var myApp = angular.module("myModule", ["ngRoute"])
.config(function ($routeProvider)
{
$routeProvider
.when("/Home",
{
templateUrl: "Templates/Home.html",
controller:"HomeController"
})
.when("/Department",
{
templateUrl: "Templates/Department.html",
controller: "DepartmentController"
})
})
.controller("HomeController", function ($scope)
{
$scope.message="Home Page";
})
.controller("DepartmentController", function ($scope)
{
$scope.department = ["Accounts", "Computer", "Library","Sales"];
})
<td>
<b>You have clicked on</b>
<div ng-view></div>
</td>
<!DOCTYPE html>
<html ng-app="myModule">
<head>
<script src="Scripts/angular.js"></script>
<script src="Scripts/Script.js"></script>
<script src="Scripts/angular-route.js"></script>
<style>
table, th, td
{
border: 1px solid grey;
border-collapse: collapse;
padding: 5px;
width:100%;
}
table tr:nth-child(odd)
{
background-color: #ffe6e6;
}
table tr:nth-child(even)
{
background-color: #ccffcc;
}
</style>
</head>
<body style="font-family:Arial; font-size:medium; color:darkblue">
<div>
<br/>
<div>
<table>
<tr>
<td>
<h3>Welcome at CareerRide.com</h3>
</td>
</tr>
<tr>
<td width="60">
<a href="#/Home">Home</a><br/>
<a href="#/Department">Department</a>
</td>
</tr>
<tr>
<td>
<b>You have clicked on</b>
<div ng-view></div>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>