Skip to content

Commit

Permalink
closes #114
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed Jul 11, 2024
1 parent 45869c8 commit 66ff592
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { Component, effect, inject, type OnInit } from '@angular/core';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import {
ActivatedRoute,
NavigationEnd,
NavigationSkipped,
Router,
} from '@angular/router';
import { filter, map, mergeMap } from 'rxjs';
import { LocaleService } from './locale.service';
import { SEOService } from './seo.service';
Expand All @@ -25,7 +30,10 @@ export class AppComponent implements OnInit {
ngOnInit(): void {
this.router.events
.pipe(
filter((event) => event instanceof NavigationEnd),
filter(
(event) =>
event instanceof NavigationEnd || event instanceof NavigationSkipped
),
map(() => this.route),
map((route) => {
while (route.firstChild) route = route.firstChild;
Expand Down

0 comments on commit 66ff592

Please sign in to comment.