1
当我尝试下面的代码在PlunkrPageNotFoundComponent
被加载在我看来:角2路由器不匹配的路径
的src/APP-routing.module(节选)
const appRoutes: Routes = [
{ path: '', redirectTo: '/one', pathMatch: 'full' },
{ path: '**', component: PageNotFoundComponent }
];
当我除去wildcard
路径I获得所需的结果(组分one
在视图中被加载):
const appRoutes: Routes = [
{ path: '', redirectTo: '/one', pathMatch: 'full' },
];
我错过了什么?
这里有一个plunker https://embed.plnkr.co/MxM5JCJmwHVVSuTdfWZg/
这是我见过的最快最好的答案!谢谢!它现在有效! –
@EugeneEpifanov哈哈,很高兴我可以帮助! – echonax