Created
February 6, 2020 13:28
-
-
Save syzer/2aade1eab469a1eb1351f9c62fdc8d72 to your computer and use it in GitHub Desktop.
When ref stayed in the nodes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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