When using html5mode(true) views are not loading on page refresh in angular.js
<base href="/">
<div ng-app="directives" >
<a href="/home">Home</a>
<a href="/about">about</a>
<a href="/contact">contact</a>
<div ng-view></div>
</div>
in config
directives.config(["$routeProvider","$locationProvider",function($routeProvider,$locationProvider){
$routeProvider.when("/",{
templateUrl:"directives/home.html"
}).when("/home",{
templateUrl:"directives/about.html"
}).when("/about",{
templateUrl:"directives/contact.html"
}).when("/contact",{
templateUrl:"directives/about.html"
}).otherwise({
redirectTo : "/"
})
$locationProvider.html5Mode(true).hashPrefix("!")
}])
not rendering the proper view.