引入模块filter
this.router.events.pipe(filter(x=>x instanceof NavgationEnd)).subscribe((x:NavgationEnd)=>{
})