Home > Software engineering >  Navigating to different page without saving changes yields a page that just says 'Home'
Navigating to different page without saving changes yields a page that just says 'Home'

Time:10-07

There is a page having some information where if we try to make same change(i.e., if we select any device to load and change it's description) and at the same time if we make move to different tab by clicking yes to the question that do you want to move without saving the change it goes to page saying "Home", instead of going to the required tab.

Please help me to make the changes, so this doesn't happen, it mostly occurs at the first login to the application after the most recent logout.

We use angular in FE.

CodePudding user response:

give each tab a route in routing-module and if you go to that route from home and then to another page the on discard you can use location.back() and you will be navigated back to that tab

  • Related