Skip to content

Instantly share code, notes, and snippets.

@cesalberca
Created May 6, 2020 12:59
Show Gist options
  • Save cesalberca/0ba99edc453684748a55940555ec66f1 to your computer and use it in GitHub Desktop.
Save cesalberca/0ba99edc453684748a55940555ec66f1 to your computer and use it in GitHub Desktop.
if (isProtected) {
/**
* We have to execute this code outside of the JavaScript's main context
* in order to let Angular finish with the closing animation
*/
setTimeout(() => {
this.router.navigate([paths.root])
}, 0)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment