hey,
i wanted to ask how i can trigger a restart of my ionic 2 app.
hey,
i wanted to ask how i can trigger a restart of my ionic 2 app.
If you’re asking about an app that you just created and still haven’t made any changes to it, then just delete the app’s folder and then use ionic start
with the same parameters that you used to create it the first time.
i like to programmatically do the app restart.
for example with a button.
is that somehow possible?
Sorry, I misunderstood your question, if you want to restart the app itself check out the following article.
that’s exactly what i was looking for.
thx very much for your fast reply
this link for android app but how I can do the same for IOS
I would try the following:
window.location.reload()
to reinit all js stuffIf anyone is using lazy loading like me, I faced a problem with window reloading while I am still in the old page. This can be solved by doing the reload inside of setRoot
callback.
Do you have a code sample of how this might work in Ionic 1?
that’s very different way of code then we use now a days, can provide another code sample.
Thanks a lot @Zahema.
I tried some options to restart my app, but they didn’t work. I think because the use of Lazy Loading that you mentioned. With your solution I can restart the app with Ionic 3 and Lazy Loading.
Kind regards.
Fernando.