【发布时间】:2016-11-07 10:14:14
【问题描述】:
我的 plunkr 有问题。 http://plnkr.co/edit/70ZFRPJdAraDDV8heMlo?p=preview
const routes = [
{path: 'test', component: Test},
{path: 'home', component: HomeComponent},
{path: '', redirectTo: 'home', pathMatch: "full"}
];
this.router.navigate('/test');
我不能简单地做一个 router.navigate。我有错误:
错误:无法匹配任何路由。网址段:'t/e/s/t'
在我看来一切都很好。 与Cannot match any routes: '' 相关,但我没有任何子路线。
谢谢
【问题讨论】: