import {RouterModule, Routes} from "@angular/router"; import {StatisticComponent} from "./stats.component"; import {WarDetailComponent} from "./war-detail/war-detail.component"; import {WarSubmitComponent} from "./war-submit/war-submit.component"; import {WarListComponent} from "./war-list/war-list.component"; import {StatisticOverviewComponent} from "./overview/stats-overview.component"; import {WarItemComponent} from "./war-list/war-item.component"; import {ModuleWithProviders} from "@angular/core"; import {CampaignSubmitComponent} from "./campaign-submit/campaign-submit.component"; import {CampaignPlayerDetailComponent} from "./campaign-player-detail/campaign-player-detail.component"; export const statsRoutes: Routes = [{ path: '', component: StatisticComponent, children: [ { path: '', component: WarListComponent } ] }, { path: 'overview/:id', component: StatisticOverviewComponent, outlet: 'right' }, { path: 'new-campaign', component: CampaignSubmitComponent, outlet: 'right' }, { path: 'new', component: WarSubmitComponent, outlet: 'right' }, { path: 'war/:id', component: WarDetailComponent, outlet: 'right' }, { path: 'campaign-player/:id/:playerName', component: CampaignPlayerDetailComponent, outlet: 'right' },]; export const statsRouterModule: ModuleWithProviders = RouterModule.forChild(statsRoutes); export const statsRoutingComponents = [StatisticComponent, StatisticOverviewComponent, CampaignSubmitComponent, WarListComponent, WarSubmitComponent, WarDetailComponent, CampaignPlayerDetailComponent, WarItemComponent];