title: Auth guard - angular - toastr service is not working
body: <pre><code>export class AuthGuard implements CanActivate {
    constructor(private accountService:AccountService, private toastr:ToastrService){}
    canActivate(): Observable&lt;boolean&gt; {
      return this.accountService.currentUser$.pipe(
        map(user =&gt; {
          if (user) return true;
          this.toastr.error('You shall not pass!'); &lt;====== this is not working
          return false;
        })
      )
    }  
  }
  </code></pre>
  <p>I have a problem that toastr service error is not displayed as expected as an unauthorized .. Has anyone faced the same problem and fixed it ?</p>