This Piece of code works absolutely fine with cdn https://ajax.googleapis.com/ajax/libs/angularjs/1.2.3//angular-route.min.js
but not with https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6//angular-route.min.js
Where is the issue?
config.js
var mainApp = angular.module("mainApp", ['ngRoute']);
mainApp.config(['$locationProvider','$routeProvider',function($locationProvider,$routeProvider)
{
// $locationProvider.hashPrefix('!');
$routeProvider
.when('/home', {
templateUrl: 'home.html',
controller: 'StudentController'
})
.when('/viewStudents', {
templateUrl: 'viewStudents.html',
controller: 'StudentController'
})
.otherwise({
redirectTo: '/home'
});
}]);