mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs: update an example in the RouterEvent description (#50526)
PR Close #50526
This commit is contained in:
committed by
Pawel Kozlowski
parent
ad82f3ab47
commit
ee073cdfae
@@ -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
|
||||
* });
|
||||
|
||||
Reference in New Issue
Block a user