I am migrating to ui-router in Angular 1.5 and I need to setup the state provider so when I enter the base URL for my app it goes to my home state, but if user enters some non-existing path, it shows a custom "404" template.
If I set the default state with urlProvider.otherwise()
, I can no longer set the 404 template, and if I set up a state with url: ""
and set up urlProvider.otherwise()
for showing 404 template, then the base url will show the 404 template always.
How can I correctly configure this?