I am facing an issue with my Angular application where the controller is routed as follows:
controllers/favorites.js
...
$stateProvider.state('app.favorites' {url: '/favorites'} ...);
index.html
...
<a ui-sref="app.favorites"> ...
Clicking on the <a>
tag correctly navigates to the controller, routing the page to /favorites
. However, upon page refresh, a 404 error occurs (even though the URL remains as /favorites
)
Do you have any insights into why this might be happening? The app is being run using http-server
, but the same problem persists when using python -mSimpleHTTPServer