Skip to content

Instantly share code, notes, and snippets.

@gavilanch
Created June 25, 2019 21:35
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 gavilanch/246f012bef9ec414c45926cef9ccbe47 to your computer and use it in GitHub Desktop.
Save gavilanch/246f012bef9ec414c45926cef9ccbe47 to your computer and use it in GitHub Desktop.
ngOnInit() {
   this.afAuth.user.subscribe(user => {
     if (user) {
       this.ngZone.run(() => {
         this.router.navigate(['/todos']);
     })
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment