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 = [
Shell.childRoutes([
{ path: '', loadChildren: './map/map.module#MapModule' },
{ path: 'map', loadChildren: './map/map.module#MapModule' },
{ 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 { 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],

2
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') } }
])
];

3
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({

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

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

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

@ -1,6 +1,6 @@
<header>
<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
class="navbar-toggler"
type="button"
@ -13,10 +13,6 @@
</button>
<div id="navbar-menu" class="collapse navbar-collapse float-xs-none" [ngbCollapse]="menuHidden">
<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">
<i class="fas fa-map"></i>
&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 {
menuHidden = true;
constructor(private i18nService: I18nService, private logService: LogsService) {}
constructor(private i18nService: I18nService, public logService: LogsService) {}
ngOnInit() {}

Loading…
Cancel
Save