var memberlistApp=angular.module("memberlistApp", ['ngRoute']); memberlistApp.config(['$routeProvider', function($routeProvider) { $routeProvider .when('/list', { templateUrl: 'viewStudents.htm', controller: 'ViewStudentsController' }) .when('/add', { templateUrl: 'addStudent.htm', controller: 'AddStudentController' }) .otherwise( { redirectTo: '/list' }); }]); memberlistApp.controller('AddStudentController', function($scope) { $scope.content="This page will be used to display add student form"; }); memberlistApp.controller('ViewStudentsController', function($scope) { $scope.content="This page will be used to display all the students"; });