1

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

varun aaruru
  • 2,920
  • 1
  • 20
  • 36
viola
  • 60
  • 7

1 Answers1

1

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.

Kaixin
  • 103
  • 2
  • 8
  • thank you for your answer but if the app has many pages ,this is a really serious issue,since ionic give up angular router,. – viola May 11 '17 at 04:01
  • Maybe I miss a point, but how is it a serious issue? When you are opening an app on your phone, you usually lands on some kind of "Home page". That is actually a pretty standard behavior. – Kaixin May 11 '17 at 04:06
  • I just open the app in browser, i just wanner webapp without cordova. I develop the app and preview in chrome. So this is a big issue for development and debug in browser. Mybe this is a not cerrect way... – viola May 11 '17 at 04:09
  • are you chinese ? hah ,from you user name 'kai xin' can translate to '开心' – viola May 11 '17 at 04:15
  • Yes, we could say that's a limitation of debug in browser with Ionic. I have no better idea to help you. And nope, French actually. But I do know Chinese :) – Kaixin May 11 '17 at 04:18
  • :) your username mean to ‘smile,happy’ in chinese – viola May 11 '17 at 04:22
  • You're welcome ^^ You can mark the answer as accepted if you think it deserves it. And good luck for your dev :) – Kaixin May 11 '17 at 04:27