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.

最新文章

  1. jquery ripples水波纹效果( 涟漪效果)
  2. 北大poj- 1028
  3. .html()和.text()的区别
  4. sourcesafe.light 开源项目启动
  5. Java Collection好文章
  6. HTML5 Socket通信
  7. 修改UISearBar的文字颜色,placehoder颜色及输入框颜色
  8. VC++深入详解-第一章学习心得(二)
  9. WinpCap 使用线程发数,明明发了,返回值0是OK的啊,怎么抓包看不到,难道不支持多线程。。。
  10. C/C++中define的使用
  11. Java通过axis调用.NET WebService
  12. MYSQL中的普通索引,主健,唯一,全文索引区别
  13. JSTL c标签,fn标签,fmt标签 - 生活在爪洼岛上 - ITeye技术网站
  14. k-means算法概述
  15. Beautiful Dream hdu3418 (直接做或二分)
  16. ( ! ) Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in D:\demo\code\yolo\index\index.php on li
  17. Linux(二十一)Shell编程
  18. django插入数据库错误:mysql的1267错误
  19. PAT 1011 A+B和C
  20. [security] security engine things

热门文章

  1. Unity 3D 开发 —— 脚本编程
  2. centos7基础配置
  3. Android 阅读器架构图,网上收集,留做存货
  4. ubuntu16 升级后找不到 eth0 网卡 的解决方法
  5. mysql 不能启动的两种错误提示及解决方法
  6. js--07 编解码,eval
  7. 8.NPM 使用介绍
  8. Spring中提供的集合工具类util CollectionUtils
  9. 基于WebSphere与Domino的电子商务网站构架分析
  10. 将vue-cli 2.x的项目升级到3.x