LocationStrategy` is responsible for representing and reading route state
- from the browser’s URL. Angular provides two strategies:
- {@link HashLocationStrategy} (default) and {@link PathLocationStrategy}.
改变根路径
import {bootstrap} from 'angular2/platform/browser' |
看这个,很多路由相关的知识
https://auth0.com/blog/2016/01/25/angular-2-series-part-4-component-router-in-depth/
routerLink 可以这么写,直接跳到子路去
<li (click)="loopNav($event)"> <a [routerLink]="['ParentApp','NumberItem']">Double</a></li> |
因为这里。。。。
Aux的路径显示也是因为这里
// default instructions override these |
找到另外一种 AuxRoute 的写法
@Component({ |
这是群主的写法
@Component({ |