[Angular2 Router] Index router
index Router Angular2
2023-09-14 09:00:53 时间
Index router as default router.
import {RouterModule} from "@angular/router"; import {NotFoundComponent} from "./shared-components/not-found/not-found.component"; const indexRoute = {path: '', redirectTo: 'home', pathMatch: 'full'}; const fallbackRoute = {path: '**', component: NotFoundComponent}; const routes = [ {path: 'legacy-url', redirectTo: '/home', pathMatch: 'prefix'}, {path: 'home', loadChildren: 'app/home/home.module', name: 'Home'}, {path: 'heros', loadChildren: 'app/heros/heros.module', name: 'Heros'}, {path: 'contact', loadChildren: 'app/contact/contact.module', name: 'Contact'}, {path: 'message', loadChildren: 'app/message/message.module', name: 'Message'}, {path: 'playground', loadChildren: 'app/playground/playground.module', name: 'Playground'}, {path: 'realtime', loadChildren: 'app/realtime/realtime.module', name: 'Realtime'}, {path: 'wiki-path', loadChildren: 'app/auxroute/auxroute.module', name: 'WikiDetail', outlet: 'wiki'}, {path: 'courses', loadChildren: 'app/courses/courses.module', name: 'Courses'}, indexRoute, fallbackRoute, ]; export default RouterModule.forRoot(routes, {useHash: true});
Index router, usually comes as last, just right before the fallback router.
相关文章
- react-router/v5之Router、Route、Redirect、Switch源码解析
- ORA-29871: invalid alter option for a domain index ORACLE 报错 故障修复 远程处理
- ORA-38913: Index specified in the index hint is invalid ORACLE 报错 故障修复 远程处理
- ORA-08117: Index Organized Table operation released its block pin ORACLE 报错 故障修复 远程处理
- ORA-13228: spatial index create failed due to invalid type ORACLE 报错 故障修复 远程处理
- ORA-13234: failed to access R-tree-index table [string] ORACLE 报错 故障修复 远程处理
- ORA-14061: data type or length of an index partitioning column may not be changed ORACLE 报错 故障修复 远程处理
- ORA-14142: ALTER INDEX VISIBLE|INVISIBLE may not be used with certain types of index ORACLE 报错 故障修复 远程处理
- ORA-14297: Index block size mismatch in ALTER TABLE EXCHANGE [SUB]PARTITION ORACLE 报错 故障修复 远程处理
- Python index()方法:检测字符串中是否包含某子串
- 实战BULK COLLECT(成批聚合类型)和数组集合type类型is table of 表%rowtype index by binary_integer详解数据库
- Mysql中Index函数的使用(index函数mysql)