mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
docs: update an example in the RouterEvent description (#50526)
PR Close #50526
This commit is contained in:
parent
ad82f3ab47
commit
ee073cdfae
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ export const enum EventType {
|
|||
* class MyService {
|
||||
* constructor(public router: Router) {
|
||||
* router.events.pipe(
|
||||
* filter((e: Event): e is RouterEvent => e instanceof RouterEvent)
|
||||
* filter((e: Event | RouterEvent): e is RouterEvent => e instanceof RouterEvent)
|
||||
* ).subscribe((e: RouterEvent) => {
|
||||
* // Do something
|
||||
* });
|
||||
|
|
|
|||
Loading…
Reference in a new issue