AsyncRoute is a type of RouteDefinition used to route a path to an asynchronously loaded component.
import {RouteConfig} from 'angular2/router'; |
重点参数loader: Function
异步— 大概猜测用处在于子路由的切换过程中,不block整个UI
主路由切换的话,如果除了要outlet的组件外还有其他工作要处理和渲染,也应该用这个
export class AuxRoute
AuxRoute is a type of RouteDefinition used to define an auxiliary route.
辅助性路由
<a [routerLink]="['ParentApp',['Alert']]">ParentApp</a> |
https://github.com/kittencup/angular2-router-example/blob/master/src/app/product/Product.ts