I am new in angular, i create an app using angularJs (used ngRoute for for routing) it works perfect with links from one page to another, but the problem is when i paste url direct or edit it for browser url bar the browser show "This page can't be found" I used $locationProvider html4 mode for removing # from url. so please help me someone is it because of this or what?
here is my routes
angular
.module("myApp", ["ngSanitize", "ngLoadingSpinner", "ngRoute"])
.config(function ($locationProvider, $routeProvider) {
$routeProvider
.when('/' , {
templateUrl: "templates/index.tpl.html"
})
.when('/work' , {
templateUrl: "templates/work.tpl.html"
})
.when('/work/:id' , {
templateUrl: "templates/workDetail.tpl.html"
})
.otherwise({redirectTo:'/'});
$locationProvider.html5Mode(true);
});
and URl look like this http://127.0.0.1:8080/work/1