this is my Index.html code
<!DOCTYPE html>
<html ng-app="demo">
<head>
<title></title>
<script src="scripts/angular.min.js"></script>
<script src="scripts/angular-route.min.js"></script>
<script src="scripts/CustomAngularJavaScript.js"></script>
<link href="StyleSheet1.css" rel="stylesheet" />
<base href="/">
</head>
<body>
<table>
<tr><td colspan="2" class="header">
<h1>Web Portal</h1>
</td></tr>
<tr><td class="leftmenu">
<a href="Home">Home</a>
<a href="Courses">Courses</a>
<a href="Students">Student</a>
</td>
<td class="mainContent"><ng-view></ng-view></td>
</tr>
<tr>
<td colspan="2" class="footer"><b>Copyright</b></td>
</tr>
</table>
</body>
</html>
second one js code
/// <reference path="angular.min.js" />
var angualarModule = angular.module("demo", ["ngRoute"]);
angualarModule.config(["$routeProvider","$locationprovider",function ($routeProvider,$locationprovider) {
$routeProvider.
when('/Home', {
templateUrl: 'Templates/Home.html',
controller: 'HomeController'
}).
when('/Courses', {
templateUrl: 'Templates/Courses.html',
controller: 'CourseController'
}).
when('/Students', {
templateUrl: 'Templates/Students.html',
controller: 'StudentsController'
})
$locationprovider.html5mode(true);
}])
angualarModule.controller("HomeController", function ($scope) {
$scope.message = "Home Page" ;
})
angualarModule.controller("CourseController", function ($scope) {
$scope.courses = ["C Sharp","Angular","MVC"] ;
})
angualarModule.controller("StudentsController", function ($scope) {
$http.post('Service.asmx/getUser').then(function (res) {
$scope.students = res.data;
});
})
throwing error "angular.min.js:6Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.8/$injector/modulerr?p0=demo&p1=Error%3A%20…0g%20(http%3A%2F%2Flocalhost%3A61022%2Fscripts%2Fangular.min.js%3A39%3A319)"
Can anyone please tell me what am doing wrong, the error being showed only when i add "$locationprovider" in angular module