Angular中获取路由信息
作者:互联网
constructor (
private router: Router,
) {this.urlChangeSubscriptions = router.events.subscribe((param) => { if (param instanceof NavigationEnd) { const urls = param.url.split('/'); if (this.isDealsProject) { this.currentTab = urls[3] || ''; } else { this.currentTab = urls[2] || ''; } } }); }
标签:instanceof,const,param,获取,路由,urls,router,Angular,currentTab 来源: https://www.cnblogs.com/juliazhang/p/11384003.html