11import { Routes } from '@angular/router' ;
22
3- import { HomeComponent } from './components/home-component/home-component' ;
43import { LoginComponent } from './components/welcome-layout/login-component/login-component' ;
54import { RegisterComponent } from './components/welcome-layout/register-component/register-component' ;
65import { authenticateGuard } from './guards/authenticate-guard' ;
@@ -9,20 +8,50 @@ import { SettingsComponent } from './components/settings-component/settings-comp
98import { ImportWizardComponent } from './components/import/import-wizard-component/import-wizard-component' ;
109import { MonthlyComparisonComponent } from './components/analytics/monthly-comparison-component/monthly-comparison-component' ;
1110import { TrackingComponent } from './components/tracking/tracking/tracking.component' ;
11+ import { DashboardComponent } from './components/dashboard-component/dashboard-component.component' ;
1212
1313export const routes : Routes = [
1414 { path : '' , redirectTo : 'login' , pathMatch : 'full' } ,
15- { path : 'login' , component : LoginComponent } ,
16- { path : 'register' , component : RegisterComponent } ,
17- { path : 'home' , component : HomeComponent , canActivate : [ authenticateGuard ] } ,
18- { path : 'movements' , component : TrackingComponent , canActivate : [ authenticateGuard ] } ,
19- { path : 'balance' , component : BalanceComponent , canActivate : [ authenticateGuard ] } ,
20- { path : 'settings' , component : SettingsComponent , canActivate : [ authenticateGuard ] } ,
21- { path : 'import' , component : ImportWizardComponent , canActivate : [ authenticateGuard ] } ,
15+ { path : 'login' , component : LoginComponent , data : { breadcrumb : 'Login' } } ,
16+ { path : 'register' , component : RegisterComponent , data : { breadcrumb : 'Register' } } ,
2217 {
23- path : 'analytics/monthly-comparison' ,
24- component : MonthlyComparisonComponent ,
18+ path : 'home' ,
2519 canActivate : [ authenticateGuard ] ,
20+ data : { breadcrumb : 'Home' } ,
21+ children : [
22+ { path : '' , redirectTo : 'dashboard' , pathMatch : 'full' } ,
23+ { path : 'dashboard' , component : DashboardComponent , data : { breadcrumb : 'Dashboard' } } ,
24+ { path : 'balance' , component : BalanceComponent , data : { breadcrumb : 'Balance' } } ,
25+ ] ,
26+ } ,
27+ {
28+ path : 'movements' ,
29+ canActivate : [ authenticateGuard ] ,
30+ data : { breadcrumb : 'Movements' } ,
31+ children : [
32+ { path : '' , redirectTo : 'tracking' , pathMatch : 'full' } ,
33+ { path : 'tracking' , component : TrackingComponent , data : { breadcrumb : 'Tracking' } } ,
34+ { path : 'import' , component : ImportWizardComponent , data : { breadcrumb : 'Import' } } ,
35+ ] ,
36+ } ,
37+ {
38+ path : 'analytics' ,
39+ canActivate : [ authenticateGuard ] ,
40+ data : { breadcrumb : 'Analytics' } ,
41+ children : [
42+ { path : '' , redirectTo : 'monthly-comparison' , pathMatch : 'full' } ,
43+ {
44+ path : 'monthly-comparison' ,
45+ component : MonthlyComparisonComponent ,
46+ data : { breadcrumb : 'Monthly Comparison' } ,
47+ } ,
48+ ] ,
49+ } ,
50+ {
51+ path : 'settings' ,
52+ component : SettingsComponent ,
53+ canActivate : [ authenticateGuard ] ,
54+ data : { breadcrumb : 'Settings' } ,
2655 } ,
2756 { path : '**' , redirectTo : 'login' } ,
2857] ;
0 commit comments