Hon*_*iao 4 angular2-routing angular
如果用户输入了不存在的链接,我希望页面重定向到主页.
我该怎么做?谢谢
@RouteConfig([
{path: '/home', name: 'Home', component: HomeComponent},
{path: '/about', name: 'About', component: AboutComponent},
{path: '/???', name: 'not-found', redirectTo: ['Home']}
])
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1655 次 |
| 最近记录: |