angualr2+应该通过router取得当前页面的url,构造器注入ActivatedRoute private router: Router,private route: ActivatedRoute, 然后取当前路由路径 this.route.url,取得的url是个数组,而且是异步的,需要join起来。
angualr2+应该通过router取得当前页面的url,构造器注入ActivatedRoute
private router: Router,
private route: ActivatedRoute,
然后取当前路由路径
this.route.url,取得的url是个数组,而且是异步的,需要join起来。