angular8监听路由变化

【angular8监听路由变化】
angular8监听路由变化

ngOnInit() { this.listenRouterChange(); } listenRouterChange() { this.rooterChange = this.router.events.pipe( filter(event => event instanceof NavigationEnd) ).subscribe((res: any) => { console.log(8888888); }); }

    推荐阅读