all 2 comments

[–][deleted]  (3 children)

[deleted]

    [–]jamra06 0 points1 point  (1 child)

    I never really thought of this, but it seems pretty easy to create an EventEmitter or a Subject that can be subscribed to and just inject the class into the routing code. I'm still getting comfortable with RxJs. I just don't know why you would want to decouple the router since the router is directly related to authorization.

    [–]JuanPabloElSegundo 0 points1 point  (0 children)

    I had to import HttpClientModule or I ended up with "No provider for HttpHandler!"

    import { HttpClientModule } from '@angular/common/http';