Browse Source

feat: Hide HomeComponent since it's not being used

master
Konstantinos Kamaropoulos 4 years ago
parent
commit
3ec57837dc
  1. 1
      src/app/app-routing.module.ts
  2. 4
      src/app/app.module.ts
  3. 2
      src/app/home/home-routing.module.ts
  4. 3
      src/app/map/map-routing.module.ts
  5. 2
      src/app/map/map.component.ts
  6. 6
      src/app/shell/header/header.component.html
  7. 2
      src/app/shell/header/header.component.ts

1
src/app/app-routing.module.ts

@ -4,6 +4,7 @@ import { Shell } from '@app/shell/shell.service';
const routes: Routes = [ const routes: Routes = [
Shell.childRoutes([ Shell.childRoutes([
{ path: '', loadChildren: './map/map.module#MapModule' },
{ path: 'map', loadChildren: './map/map.module#MapModule' }, { path: 'map', loadChildren: './map/map.module#MapModule' },
{ path: 'chart', loadChildren: './chart/chart.module#ChartModule' } { path: 'chart', loadChildren: './chart/chart.module#ChartModule' }
]), ]),

4
src/app/app.module.ts

@ -9,7 +9,7 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { environment } from '@env/environment'; import { environment } from '@env/environment';
import { CoreModule } from '@app/core'; import { CoreModule } from '@app/core';
import { SharedModule } from '@app/shared'; import { SharedModule } from '@app/shared';
import { HomeModule } from './home/home.module'; // import { HomeModule } from './home/home.module';
import { ShellModule } from './shell/shell.module'; import { ShellModule } from './shell/shell.module';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
@ -26,7 +26,7 @@ import { ChartComponent } from './chart/chart.component';
CoreModule, CoreModule,
SharedModule, SharedModule,
ShellModule, ShellModule,
HomeModule, // HomeModule,
AppRoutingModule // must be imported as the last module as it contains the fallback route AppRoutingModule // must be imported as the last module as it contains the fallback route
], ],
declarations: [AppComponent], declarations: [AppComponent],

2
src/app/home/home-routing.module.ts

@ -7,7 +7,7 @@ import { Shell } from '@app/shell/shell.service';
const routes: Routes = [ const routes: Routes = [
Shell.childRoutes([ Shell.childRoutes([
{ path: '', redirectTo: '/home', pathMatch: 'full' }, // { path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent, data: { title: extract('Home | Aiolos') } } { path: 'home', component: HomeComponent, data: { title: extract('Home | Aiolos') } }
]) ])
]; ];

3
src/app/map/map-routing.module.ts

@ -6,7 +6,8 @@ import { MapComponent } from './map.component';
const routes: Routes = [ const routes: Routes = [
// Module is lazy loaded, see app-routing.module.ts // 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({ @NgModule({

2
src/app/map/map.component.ts

@ -17,8 +17,6 @@ export class MapComponent implements OnInit {
pointsToDisplay = 10; pointsToDisplay = 10;
// data: Array<Object>;
map: mapboxgl.Map; map: mapboxgl.Map;
style = 'mapbox://styles/mapbox/streets-v11'; style = 'mapbox://styles/mapbox/streets-v11';
lat = 37.9838; lat = 37.9838;

6
src/app/shell/header/header.component.html

@ -1,6 +1,6 @@
<header> <header>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" routerLink="/home" translate>APP_NAME</a> <a class="navbar-brand" routerLink="/map" translate>APP_NAME</a>
<button <button
class="navbar-toggler" class="navbar-toggler"
type="button" type="button"
@ -13,10 +13,6 @@
</button> </button>
<div id="navbar-menu" class="collapse navbar-collapse float-xs-none" [ngbCollapse]="menuHidden"> <div id="navbar-menu" class="collapse navbar-collapse float-xs-none" [ngbCollapse]="menuHidden">
<div class="navbar-nav"> <div class="navbar-nav">
<a class="nav-item nav-link text-uppercase" routerLink="/home" routerLinkActive="active">
<i class="fas fa-home"></i>
&nbsp;<span translate>Home</span>
</a>
<a class="nav-item nav-link text-uppercase" routerLink="/map" routerLinkActive="active"> <a class="nav-item nav-link text-uppercase" routerLink="/map" routerLinkActive="active">
<i class="fas fa-map"></i> <i class="fas fa-map"></i>
&nbsp;<span translate>Map</span> &nbsp;<span translate>Map</span>

2
src/app/shell/header/header.component.ts

@ -11,7 +11,7 @@ import { LogsService } from '@app/logs.service';
export class HeaderComponent implements OnInit { export class HeaderComponent implements OnInit {
menuHidden = true; menuHidden = true;
constructor(private i18nService: I18nService, private logService: LogsService) {} constructor(private i18nService: I18nService, public logService: LogsService) {}
ngOnInit() {} ngOnInit() {}

Loading…
Cancel
Save