const appRoutes: Routes = [ { path: '', redirectTo: '/markets', pathMatch: 'full' }, { path: 'markets', component: MarketsComponent }, { path: 'sports', component: SportsComponent } ]; |
const appRoutes: Routes = [ { path: '', redirectTo: '/markets', pathMatch: 'full' }, { path: 'markets', component: MarketsComponent }, { path: 'sports', component: SportsComponent }, { path: 'weather', loadChildren: './weather/weather.module#WeatherModule' }, { path: 'currency', loadChildren: './currency/currency.module#CurrencyModule' } ]; |
<li routerLinkActive="active"> <a routerLink="/sports">Sports</a></li> |
<li class="dropdown"> <a href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle">Weather <span class="caret"></span></a> <ul class="dropdown-menu"> <li routerLinkActive="active"><a [routerLink]="['/weather/yahoo']">Yahoo! Weather</a></li> <li routerLinkActive="active"><a [routerLink]="['/weather/facts']">Weather Facts</a></li> <li routerLinkActive="active"><a [routerLink]="['/weather/globalwarming']">Global Warming</a></li> </ul> </li> <li routerLinkActive="active"> <a routerLink="/currency">Currency</a></li> |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |