I am using Angular JS, asp.net web api project.
When I route using the following url
I get the following error
Description: HTTP 404. The resource you are looking for...
But when I use the following link
http://localhost:3458/#/Profile
I do not get the 404 error.
I have googled and looked at other Stack overflow answers to the same question but still no success. Here is my code.
appointmentReminderApp.config(function ($routeProvider, $locationProvider, $httpProvider) {
$httpProvider.interceptors.push('authInterceptorService');
$locationProvider.html5Mode(true).hashPrefix('!');
$routeProvider
// Auth
.when("/home", {
templateUrl: "App/Home.html",
controller: "HomeController"
})
.when("/Register", {
templateUrl: "App/AuthForm/templates/register.html",
controller: "authRegisterController"
})
.when("/Profile", {
templateUrl: "App/ProfileForm/templates/profile.html",
controller: "profileController"
})
// All else
.otherwise({ redirectTo: "/home" });
});