var app = angular.module("ApplicationModule", ["ngRoute"]);
app.factory("ShareData", function () {
return { value: 0 }
});
app.config(['$routeProvider','$locationProvider', function ($routeProvider,$locationProvider) {
$routeProvider.when('/showemployees',
{
templateUrl: 'EmployeeInfo/ShowEmployees',
controller: 'ShowEmployeesController'
});
$routeProvider.when('/addemployee',
{
templateUrl: 'EmployeeInfo/AddNewEmployee',
controller: 'AddEmployeeController'
});
$routeProvider.when("/editemployee",
{
templateUrl: 'EmployeeInfo/EditEmployee',
controller: 'EditEmployeeController'
});
$routeProvider.when('/deleteemployee',
{
templateUrl: 'EmployeeInfo/DeleteEmployee',
controller: 'DeleteEmployeeController'
});
$routeProvider.otherwise(
{
redirectTo: '/'
});
$locationProvider.html5Mode(true).hashPrefix('!')
}]);
I got this error in browser console
Error: [$location:nobase] $location in HTML5 mode requires a <base> tag to be present!
http://errors.angularjs.org/1.3.16/$location/nobase
at angular.js:63
at $LocationProvider.$get (angular.js:11384)
at Object.invoke (angular.js:4219)
at angular.js:4037
at getService (angular.js:4178)
at Object.invoke (angular.js:4210)
at angular.js:4037
at getService (angular.js:4178)
at Object.invoke (angular.js:4210)
at angular.js:6556(anonymous function) @ angular.js:11699
http://localhost:11111/__browserLink/requestData/10da8e4ba855456d8191af0b0dd4e06f Failed to load resource: the server responded with a status of 404 (Not Found)