Skip to content
This repository was archived by the owner on Sep 4, 2020. It is now read-only.

Commit bd3f916

Browse files
feat: add routes, navbar styling
1 parent 45cc594 commit bd3f916

25 files changed

+267
-374
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>analytics works!</p>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import '../styles/variables';
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-analytics',
5+
templateUrl: 'analytics.component.html',
6+
styleUrls: ['analytics.component.scss']
7+
})
8+
export class AnalyticsComponent {
9+
public isCollapsed: boolean = true;
10+
11+
constructor() { }
12+
}

src/app/analytics/analytics.module.ts

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
import { SharedModule } from '../shared/shared.module';
5+
import { AnalyticsComponent } from './analytics.component';
6+
7+
@NgModule({
8+
imports: [CommonModule, SharedModule],
9+
declarations: [
10+
AnalyticsComponent
11+
],
12+
exports: [AnalyticsComponent]
13+
})
14+
15+
export class AnalyticsModule { }

src/app/analytics/analytics.routes.ts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Route } from '@angular/router';
2+
import { AnalyticsComponent } from './analytics.component';
3+
4+
export const analyticsRoutes: Route[] = [
5+
{
6+
path: 'analytics',
7+
data: {
8+
name: 'Analytics',
9+
icon: 'ion-arrow-graph-up-right'
10+
},
11+
component: AnalyticsComponent
12+
}
13+
];

src/app/analytics/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* This barrel file provides the export for the lazy loaded AnalyticsComponent.
3+
*/
4+
export { AnalyticsComponent } from './analytics.component';
5+
export { analyticsRoutes } from './analytics.routes';

src/app/app.module.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,25 @@ import { AppComponent } from './app.component';
88
import { routes } from './app.routes';
99

1010
import { SharedModule } from './shared/shared.module';
11-
import { HomeComponent } from './home/home.component';
11+
import { HomeModule } from './home/home.module';
12+
import { GeospacialModule } from './geospacial/geospacial.module';
13+
import { AnalyticsModule } from './analytics/analytics.module';
14+
import { KeyMetricsModule } from './key-metrics/key-metrics.module';
1215

1316
@NgModule({
1417
declarations: [
15-
AppComponent,
16-
HomeComponent
18+
AppComponent
1719
],
1820
imports: [
1921
BrowserModule,
2022
FormsModule,
2123
HttpModule,
2224
RouterModule.forRoot(routes),
2325
SharedModule.forRoot(),
26+
HomeModule,
27+
GeospacialModule,
28+
AnalyticsModule,
29+
KeyMetricsModule
2430
],
2531
providers: [],
2632
bootstrap: [AppComponent]

src/app/app.routes.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import { Routes } from '@angular/router';
22

33
import { homeRoutes } from './home/index';
4+
import { geospacialRoutes } from './geospacial/index';
5+
import { analyticsRoutes } from './analytics/index';
6+
import { keyMetricsRoutes } from './key-metrics/index';
47

58
export const routes: Routes = [
6-
...homeRoutes
9+
...homeRoutes,
10+
...geospacialRoutes,
11+
...analyticsRoutes,
12+
...keyMetricsRoutes
713
];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>geospacial works!</p>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import '../styles/variables';
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-geospacial',
5+
templateUrl: 'geospacial.component.html',
6+
styleUrls: ['geospacial.component.scss']
7+
})
8+
export class GeospacialComponent {
9+
public isCollapsed: boolean = true;
10+
11+
constructor() { }
12+
}
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
import { SharedModule } from '../shared/shared.module';
5+
import { GeospacialComponent } from './geospacial.component';
6+
7+
@NgModule({
8+
imports: [CommonModule, SharedModule],
9+
declarations: [
10+
GeospacialComponent
11+
],
12+
exports: [GeospacialComponent]
13+
})
14+
15+
export class GeospacialModule { }
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Route } from '@angular/router';
2+
import { GeospacialComponent } from './geospacial.component';
3+
4+
export const geospacialRoutes: Route[] = [
5+
{
6+
path: 'geospacial',
7+
data: {
8+
name: 'Geospacial',
9+
icon: 'ion-ios-world-outline'
10+
},
11+
component: GeospacialComponent
12+
}
13+
];

src/app/geospacial/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* This barrel file provides the export for the lazy loaded GeospacialComponent.
3+
*/
4+
export { GeospacialComponent } from './geospacial.component';
5+
export { geospacialRoutes } from './geospacial.routes';

0 commit comments

Comments
 (0)