Skip to content

Commit

Permalink
fix(app): add missing declarative unsubscribe for title handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tomastrajan committed Jan 26, 2018
1 parent 4358ac5 commit 9418e37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ export class AppComponent implements OnInit, OnDestroy {
.pipe(takeUntil(this.unsubscribe$))
.subscribe(auth => (this.isAuthenticated = auth.isAuthenticated));
this.router.events
.pipe(filter(event => event instanceof ActivationEnd))
.pipe(
takeUntil(this.unsubscribe$),
filter(event => event instanceof ActivationEnd)
)
.subscribe((event: ActivationEnd) => {
let lastChild = event.snapshot;
while (lastChild.children.length) {
Expand Down

0 comments on commit 9418e37

Please sign in to comment.