1

If I am at certain route, I would like to go back to default route if someone hits F5. How can I do this?

yvesmancera
  • 2,915
  • 5
  • 24
  • 33
Zen
  • 11
  • 2
  • 1
    you 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

0 Answers0