Skip to content

Instantly share code, notes, and snippets.

@syzer
Created February 6, 2020 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syzer/2aade1eab469a1eb1351f9c62fdc8d72 to your computer and use it in GitHub Desktop.
Save syzer/2aade1eab469a1eb1351f9c62fdc8d72 to your computer and use it in GitHub Desktop.
When ref stayed in the nodes
platformBrowserDynamic().bootstrapModule(AppModule).then(ref => {
// Ensure Angular destroys itself on hot reloads.
if (window['ngRef']) {
window['ngRef'].destroy();
}
window['ngRef'] = ref;
// Otherwise, log the boot error
}).catch(err => console.error(err));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment