My $routeProvider
is configured like this:
teachApp.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
$routeProvider.
when('/teach/', {templateUrl: 'views/login_view.html'}).
when('/teach/overview', {templateUrl: 'views/overview_view.html'}).
when('/teach/users', {templateUrl: 'views/users_view.html'}).
otherwise({redirectTo: '/teach/'});
$locationProvider.html5Mode(true);
}]);
Within the app, if I click on a link such as <a href="/teach/overview">Overview</a>
, the overview partial shows as expected. However, when I manually change the URL in the address bar to exactly the same URL, I get a 404 error. Is $routeProvider
incorrectly configured?
I'm using MAMP localhost with the root url of the app being http://localhost/teach/