diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index acb2e4c..eee04f5 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,14 +1,15 @@ -import {NgModule} from '@angular/core'; -import {RouterModule, Routes} from '@angular/router'; -import {ThisEnvironment} from '../environments/environment.injectable'; -import {CountComponent} from './count/count.component'; -import {PrintComponent} from './print/print.component'; -import {SampleComponent} from './sample/sample.component'; -import {SettingsComponent} from './settings/settings.component'; -import {MultipleLabelsComponent} from './multiple-labels/multiple-labels.component'; +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +import { ThisEnvironment } from '../environments/environment.injectable'; +import { CountComponent } from './count/count.component'; +import { PrintComponent } from './print/print.component'; +import { SampleComponent } from './sample/sample.component'; +import { SettingsComponent } from './settings/settings.component'; +import { MultipleLabelsComponent } from './multiple-labels/multiple-labels.component'; import { DepositsComponent } from './deposits/deposits.component'; import { GraphsComponent } from './graphs/graphs.component'; -import { ImportedFilesComponent} from './imported-files/imported-files.component' +import { ImportedFilesComponent } from './imported-files/imported-files.component' +import { SidebarComponent } from './sidebar/sidebar.component'; export const routes: Routes = [ { @@ -16,20 +17,23 @@ export const routes: Routes = [ pathMatch: 'full', component: SampleComponent }, - { - path: 'deposits', - pathMatch: 'full', - component: DepositsComponent - }, { path: 'dashboard', - pathMatch: 'full', - component: GraphsComponent - }, - { - path: 'imports', - pathMatch: 'full', - component: ImportedFilesComponent + component: SidebarComponent, + children: [ + { + path: 'graphs', // child route path + component: GraphsComponent, // child route component that the router renders + }, + { + path: 'imports', + component: ImportedFilesComponent + }, + { + path: 'deposits', + component: DepositsComponent + }, + ], }, { path: 'sample', @@ -68,7 +72,7 @@ export const routes: Routes = [ ], exports: [RouterModule], providers: [ - {provide: 'APP_ENVIRONMENT', useClass: ThisEnvironment}, + { provide: 'APP_ENVIRONMENT', useClass: ThisEnvironment }, ] }) export class AppRoutingModule { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index a2af765..b1df4f4 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -5,6 +5,7 @@ import {FlexLayoutModule} from '@angular/flex-layout'; import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import {MatButtonModule} from '@angular/material/button'; import {MatCheckboxModule} from '@angular/material/checkbox'; +import {MatSidenavModule} from '@angular/material/sidenav'; import {MatCardModule} from '@angular/material/card'; import {MatOptionModule} from '@angular/material/core'; import {MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormFieldModule} from '@angular/material/form-field'; @@ -51,7 +52,8 @@ import { CustomDateAdapter } from './custom-date-adapter'; import { MatTableModule } from '@angular/material/table' import {MatGridListModule} from '@angular/material/grid-list'; import {MatDividerModule} from '@angular/material/divider'; - +import { SidebarComponent } from './sidebar/sidebar.component'; +import {MatListModule} from '@angular/material/list'; @@ -91,10 +93,13 @@ export function getBaseHref(platformLocation: PlatformLocation): string { SettingsComponent, DepositsComponent, GraphsComponent, - ImportedFilesComponent + ImportedFilesComponent, + SidebarComponent ], imports: [ MatPaginatorModule, + MatListModule, + MatSidenavModule, MatDividerModule, MatGridListModule, MatTableModule, diff --git a/src/app/graphs/graphs.component.html b/src/app/graphs/graphs.component.html index 1bed932..88015b5 100644 --- a/src/app/graphs/graphs.component.html +++ b/src/app/graphs/graphs.component.html @@ -176,9 +176,9 @@
View Graphs
Imported Files
Manage Label Inventory
+