Developing in ionic2 - ionic serve or browser refresh to a particular page rather than back to the first page of navigation stack [Solved]

I started with Ionic 2 a couple of days ago and ran into this issue - here’s a dirty hack to get around it :grinning:

Hacky / Temporary Solution:

All you have to do is set the rootPage within app.component.ts to the page that you’re currently developing - that way it will reload to that location rather than the ‘beginning’ of the app flow.

example:

rootPage = thePageImWorkingOnNow

Of course you’ll have to remember to change the rootPage back to the intended e.g. login page or what have you when you’re ready for production, but for development this saves tens of minutes per day!

Hope it helps anyone running into this issue until we have an official solution.

Cheers,

Jake

1 Like