My problem is url is not working without # . Here is my code :
angular.module('Hiren', ['ngRoute'])
.config(function ($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'partials/login.html',
controller: 'login'
})
.when('/redirect', {
templateUrl: 'partials/postLogin.html',
controller: 'postLogin'
});
$locationProvider.html5Mode(true);
});
When I try to browse the url example.com/redirect , it gives me 404 , but using hash ( example.com/#redirect) its perfectly working .