标签: angular routes angular-ui-router angular4-router
我尝试给出以下代码。但是以前的网址无法进入服务页面
previousUrl: string; constructor(router: Router) { router.events .filter(event => event instanceof NavigationEnd) .subscribe(e => { console.log('prev:', this.previousUrl); this.previousUrl = e.url; }); }