import {RouterModule, Routes} from '@angular/router'; import {StatisticComponent} from './stats.component'; import {WarListComponent} from './war/war-list/war-list.component'; import {StatisticOverviewComponent} from './campaign/overview/stats-overview.component'; import {WarItemComponent} from './war/war-list/war-item.component'; import {ModuleWithProviders} from '@angular/core'; import {CampaignSubmitComponent} from './campaign/campaign-submit/campaign-submit.component'; import {CampaignPlayerDetailComponent} from './campaign/campaign-player-detail/campaign-player-detail.component'; import {ScoreboardComponent} from './war/scoreboard/scoreboard.component'; import {WarSubmitComponent} from './war/war-submit/war-submit.component'; import {FractionStatsComponent} from './war/fraction-stats/fraction-stats.component'; import {StatisticHighScoreComponent} from './campaign/highscore/highscore.component'; import {WarHeaderComponent} from "./war/war-header/war-header.component"; import {WarEditComponent} from "./war/war-edit/war-edit.component"; import {LoginGuardMT} from "../login"; export const statsRoutes: Routes = [{ path: '', component: StatisticComponent, children: [ { path: '', component: WarListComponent } ] }, { path: 'overview/:id', component: StatisticOverviewComponent, outlet: 'right' }, { path: 'highscore/:id', component: StatisticHighScoreComponent, outlet: 'right' }, { path: 'war/:id', component: WarHeaderComponent, outlet: 'right' }, { path: 'campaign-player/:id/:playerName', component: CampaignPlayerDetailComponent, outlet: 'right' }, { path: 'campaign', component: CampaignSubmitComponent, outlet: 'right', canActivate: [LoginGuardMT] }, { path: 'campaign/:id', component: CampaignSubmitComponent, outlet: 'right', canActivate: [LoginGuardMT] }, { path: 'submit-war', component: WarSubmitComponent, outlet: 'right', canActivate: [LoginGuardMT] }, { path: 'submit-war/:id', component: WarEditComponent, outlet: 'right', canActivate: [LoginGuardMT] }]; export const statsRouterModule: ModuleWithProviders = RouterModule.forChild(statsRoutes); export const statsRoutingComponents = [StatisticComponent, StatisticOverviewComponent, StatisticHighScoreComponent, CampaignSubmitComponent, WarListComponent, WarSubmitComponent, WarEditComponent, WarHeaderComponent, ScoreboardComponent, FractionStatsComponent, CampaignPlayerDetailComponent, WarItemComponent];