From 3ec57837dc04eeffef2d55154dd3c01b905e2121 Mon Sep 17 00:00:00 2001 From: Konstantinos Kamaropoulos Date: Mon, 2 Mar 2020 22:10:25 +0200 Subject: [PATCH] feat: Hide HomeComponent since it's not being used --- src/app/app-routing.module.ts | 1 + src/app/app.module.ts | 4 ++-- src/app/home/home-routing.module.ts | 2 +- src/app/map/map-routing.module.ts | 3 ++- src/app/map/map.component.ts | 2 -- src/app/shell/header/header.component.html | 6 +----- src/app/shell/header/header.component.ts | 2 +- 7 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 17f1282..e1ef615 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -4,6 +4,7 @@ import { Shell } from '@app/shell/shell.service'; const routes: Routes = [ Shell.childRoutes([ + { path: '', loadChildren: './map/map.module#MapModule' }, { path: 'map', loadChildren: './map/map.module#MapModule' }, { path: 'chart', loadChildren: './chart/chart.module#ChartModule' } ]), diff --git a/src/app/app.module.ts b/src/app/app.module.ts index bc4c323..1016e0e 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -9,7 +9,7 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { environment } from '@env/environment'; import { CoreModule } from '@app/core'; import { SharedModule } from '@app/shared'; -import { HomeModule } from './home/home.module'; +// import { HomeModule } from './home/home.module'; import { ShellModule } from './shell/shell.module'; import { AppComponent } from './app.component'; import { AppRoutingModule } from './app-routing.module'; @@ -26,7 +26,7 @@ import { ChartComponent } from './chart/chart.component'; CoreModule, SharedModule, ShellModule, - HomeModule, + // HomeModule, AppRoutingModule // must be imported as the last module as it contains the fallback route ], declarations: [AppComponent], diff --git a/src/app/home/home-routing.module.ts b/src/app/home/home-routing.module.ts index f9e8c24..b97e5dc 100644 --- a/src/app/home/home-routing.module.ts +++ b/src/app/home/home-routing.module.ts @@ -7,7 +7,7 @@ import { Shell } from '@app/shell/shell.service'; const routes: Routes = [ Shell.childRoutes([ - { path: '', redirectTo: '/home', pathMatch: 'full' }, + // { path: '', redirectTo: '/home', pathMatch: 'full' }, { path: 'home', component: HomeComponent, data: { title: extract('Home | Aiolos') } } ]) ]; diff --git a/src/app/map/map-routing.module.ts b/src/app/map/map-routing.module.ts index 54bb85c..c97421f 100644 --- a/src/app/map/map-routing.module.ts +++ b/src/app/map/map-routing.module.ts @@ -6,7 +6,8 @@ import { MapComponent } from './map.component'; const routes: Routes = [ // Module is lazy loaded, see app-routing.module.ts - { path: '', component: MapComponent, data: { title: extract('Map | Aiolos') } } + { path: '', redirectTo: '/map', pathMatch: 'full' }, + { path: 'map', component: MapComponent, data: { title: extract('Map | Aiolos') } } ]; @NgModule({ diff --git a/src/app/map/map.component.ts b/src/app/map/map.component.ts index f467a61..d025639 100644 --- a/src/app/map/map.component.ts +++ b/src/app/map/map.component.ts @@ -17,8 +17,6 @@ export class MapComponent implements OnInit { pointsToDisplay = 10; - // data: Array; - map: mapboxgl.Map; style = 'mapbox://styles/mapbox/streets-v11'; lat = 37.9838; diff --git a/src/app/shell/header/header.component.html b/src/app/shell/header/header.component.html index 3935e02..6199e0a 100644 --- a/src/app/shell/header/header.component.html +++ b/src/app/shell/header/header.component.html @@ -1,6 +1,6 @@