这是我访问路线list/hg76hjb.hhuh67.878hhuu
import {ActivatedRoute} from '@angular2/router';
export class FooComponent {
constructor(private route: ActivatedRoute) {}
ngOnInit() {
this.route.params.subscribe((params:any) => {
this.token = +params['token'];
});
}
}
这是我的app-routing.module.ts
{path: 'list/:token', component: FooComponent}
list/gfhg76.ghfhg6
- 我收到错误Cannot GET list/gfhg76.ghfhg6
list/hgjjhk
- this.token正在获得正确的价值,即hgjjhk
请帮我提取整个令牌gfhg76.ghfhg6