Search code examples
angularionic-frameworkionic2ionic-cli

ionic3 tabs layout, how to keep the state when ionic serve reload in chrome


I use ionc3 with 'tabs layout', 'ionic serve', 'IonPageModule' for development, in chrome.

  1. when I edit the other component(not the first tab's root page ) and saved it. the browser reload and always navigate to the first tab's root page.
  2. Although there is a url for every page, reload the browser,the state can not be saved, the first tab's root page has been actived.

    If my app has many pages, this is a really serious issue.

    reference


Solution

  • That's actually not possible. After your modify your code and save, the live reload of Ionic behaves as if you restarted the application to take the new logical changes into account (note that .scss changes can be directly applied).

    If you need to "save the state", you will need a database or use the storage.