I searched a lot online to answer this question, but did not find anything.
Now I have this code in my file, which, as I thought, will handle all routes / states except those that I specified:
$urlRouterProvider.otherwise('/');
However, this functionality only works for paths such as localhost:1337/#/stuff , but if I type localhost:1337/stuff , I get an ugly internal server error.
Ideally, I would like localhost:1337/stuff or any other url without a hash band to redirect to localhost:1337/#/ (my application’s home page).
Any thoughts on how I can do this?
source share