Some way to get back to root page while live reloading?

Hi everyone,

I must say it’s a painful task whenever I make changes
It just keeps on previous active page, thus make injected providers cannot work due to initialization when the app boots up

so I just want to go back to latest root page while reloading, any way to do so?

ps: I think it’s related to some kind of app’s resume event, but I can’t find any docs about it

just push the page to root page by navigation control

So you mean every page’s constructor must pop back to the root page?
I don’t think it’s quite right…

not in constructor :joy: :joy:

when you post data or when your loader closed ,you can direct navigate to root page

well I think you got me wrong here, please correct me if I make some mistakes

what I want to convey is that every time the code is re-built, it triggers the reloading process, which keeps reloading my previous active page as only active page

ex. root => page1 => page2, here I make some changes while on page2, ionic trigger reloading and get stuck at page2 => some errors happen due to lack of initialization process

only when I get out of current session, start the app again, then it runs with updated codebase

hope I explain this situation clearly :sweat_smile:

1 Like

i think you want to ionic app still at page2 when rebuilding or refreshing
so you can set your rootPage at page2, in app.component.ts
like this

rootPage:any = page2;

can you show me your code when your page stuck in some process ?

Terribly sorry, I’m a bit busy lately

As suggested by @YAsh0011, that just fixed it

But may it be because now, I’m only working with KitKat API, and only able to (re)deploy manually after each change, so it gives me the right result

I’d record the problem, when I get back to develop for higher API levels

anw, thanks everyone :slight_smile: