If I am at certain route, I would like to go back to default route if someone hits F5. How can I do this?
Asked
Active
Viewed 962 times
1
-
1you could have `otherwise({ redirectTo: '/default page' });` in your route configuration.. – Pankaj Parkar Dec 04 '15 at 22:38
-
Not sure its clear enough - Probably the user change the route (http://yoursite.com/something) and he is not on the home page. so it make sense to refresh the url and to get the 'something' page template again – chenop Dec 04 '15 at 22:41
-
Check for some data you expect to be loaded and if it's not present change the location to the default page. – Amy Blankenship Dec 04 '15 at 22:44
-
http://stackoverflow.com/a/11542936/1886244 that might solve your problem – Chris Dec 04 '15 at 22:54
-
Possible duplicate of [AngularJS force app to start from specific URL](http://stackoverflow.com/questions/34039989/angularjs-force-app-to-start-from-specific-url) – Eymen Elkum Dec 04 '15 at 22:54