|
|
@@ -1,12 +1,28 @@ |
|
|
|
import { NgModule } from '@angular/core'; |
|
|
|
import { RouterModule, Routes } from '@angular/router'; |
|
|
|
import { DashboardComponent } from './dashboard/dashboard.component'; |
|
|
|
import { GraphComponent } from './dashboard/graph/graph.component'; |
|
|
|
import { ReportComponent } from './dashboard/report/report.component'; |
|
|
|
import { SettingsComponent } from './dashboard/settings/settings.component'; |
|
|
|
import { TableComponent } from './dashboard/table/table.component'; |
|
|
|
import { LoginComponent } from './login/login.component'; |
|
|
|
|
|
|
|
const routes: Routes = [ |
|
|
|
{ path: '', redirectTo: 'login', pathMatch: 'full' }, |
|
|
|
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' }, |
|
|
|
{ path: 'login', component: LoginComponent }, |
|
|
|
{ path: 'dashboard', component: DashboardComponent }, |
|
|
|
{ path: 'dashboard', component: DashboardComponent, children: [ |
|
|
|
{ |
|
|
|
path: '', pathMatch: 'full', redirectTo: 'graph' |
|
|
|
}, { |
|
|
|
path: 'graph', component: GraphComponent |
|
|
|
}, { |
|
|
|
path: 'partners', component: TableComponent |
|
|
|
}, { |
|
|
|
path: 'report', component: ReportComponent |
|
|
|
}, { |
|
|
|
path: 'settings', component: SettingsComponent |
|
|
|
} |
|
|
|
] }, |
|
|
|
]; |
|
|
|
|
|
|
|
@NgModule({ |
|
|
|