diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts new file mode 100644 index 0000000..98a2d69 --- /dev/null +++ b/src/app/pages/pages.module.ts @@ -0,0 +1,34 @@ +import { NgModule } from '@angular/core'; + +// Modules +import { SharedModule } from '../shared/shared.module'; + +// Routes +import { PAGES_ROUTES } from './pages.routes'; + +// Components +import { PagesComponent } from './pages.component'; + +import { DashboardComponent } from './dashboard/dashboard.component'; +import { ProgressComponent } from './progress/progress.component'; +import { Graphics1Component } from './graphics1/graphics1.component'; + +@NgModule({ + declarations: [ + PagesComponent, + DashboardComponent, + ProgressComponent, + Graphics1Component, + ], + exports: [ + DashboardComponent, + ProgressComponent, + Graphics1Component, + ], + imports: [ + SharedModule, + PAGES_ROUTES + ] +}) + +export class PagesModule { } diff --git a/src/app/pages/pages.routes.ts b/src/app/pages/pages.routes.ts new file mode 100644 index 0000000..e6b97fa --- /dev/null +++ b/src/app/pages/pages.routes.ts @@ -0,0 +1,23 @@ +import { RouterModule, Routes } from '@angular/router'; + +// Components +import { PagesComponent } from './pages.component'; + +import { DashboardComponent } from './dashboard/dashboard.component'; +import { ProgressComponent } from './progress/progress.component'; +import { Graphics1Component } from './graphics1/graphics1.component'; + +const pagesRoutes: Routes = [ + { + path: '', + component: PagesComponent, + children: [ + { path: 'dashboard', component: DashboardComponent }, + { path: 'progress', component: ProgressComponent }, + { path: 'graphics1', component: Graphics1Component }, + { path: '', redirectTo: '/dashboard', pathMatch: 'full' }, + ] + } +]; + +export const PAGES_ROUTES = RouterModule.forChild( pagesRoutes ); diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts new file mode 100644 index 0000000..df234fd --- /dev/null +++ b/src/app/shared/shared.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; + +// Components +import { BreadcrumbsComponent } from './breadcrumbs/breadcrumbs.component'; +import { HeaderComponent } from './header/header.component'; +import { NopagefoundComponent } from './nopagefound/nopagefound.component'; +import { SidebarComponent } from './sidebar/sidebar.component'; + +@NgModule({ + declarations: [ + BreadcrumbsComponent, + HeaderComponent, + NopagefoundComponent, + SidebarComponent, + ], + exports: [ + BreadcrumbsComponent, + HeaderComponent, + NopagefoundComponent, + SidebarComponent, + ] +}) + +export class SharedModule { }