I'm using pretty URLs routing with AngularJS, here is my angularJS code
var app = angular.module('app.home', ['ngRoute', 'ngAnimate']);
app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
$routeProvider.
when('/', {
templateUrl: 'static/home.html',
controller: 'AppController'
}).
when('/about', {
templateUrl: 'static/about.html',
controller: 'AppController'
}).
when('/contact', {
templateUrl: 'static/contact.html',
controller: 'AppController'
}).
when('/tutorial', {
templateUrl: 'static/tutorial.html',
controller: 'AppController'
}).
otherwise({
redirectTo: '/'
});
$locationProvider.html5Mode(true);
}]);
app.controller('AppController', function ($scope) {
});
It works fine but when I navigate to the /about (or any url other than '/') and hit refresh, it show server couldn't find the resource error. I'm using ASP.NET 5. Is there any way to redirect to that page upon which user hit refresh after refresh?