Right now, to unload remote addons we refresh the current page. This is an ugly solution, specially on real devices where it seems that the app has frozen for a few seconds before the real refresh happens.
An alternative is to destroy and re-create the app, we can show an spinner or something while this process is happening. I tried to do this but I get a lot of errors when bootstrapping the app again, the most common is:
How to reproduce this error:
- In index.html, change the body to this:
- In console, execute the following code:
I tried to create a plunkr to reproduce the issue, but with a really simple app it doesn't seem to happen: