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?

5
  • 1
    you could have otherwise({ redirectTo: '/default page' }); in your route configuration.. Commented Dec 4, 2015 at 22:38
  • Not sure its clear enough - Probably the user change the route (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 Commented Dec 4, 2015 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. Commented Dec 4, 2015 at 22:44
  • stackoverflow.com/a/11542936/1886244 that might solve your problem Commented Dec 4, 2015 at 22:54
  • Possible duplicate of AngularJS force app to start from specific URL Commented Dec 4, 2015 at 22:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.