From 13375be3366f68e8a4afd4454c5ca603f6e7a309 Mon Sep 17 00:00:00 2001 From: geek Date: Wed, 28 Feb 2018 15:46:51 +0900 Subject: [PATCH] dashboard page created --- .../commons/component/sidebar/menu-element.ts | 2 +- .../dashboard-page-routing.module.ts | 17 +++++++++++++ .../dashboard/dashboard-page.component.html | 3 +++ .../dashboard/dashboard-page.component.scss | 0 .../dashboard-page.component.spec.ts | 25 +++++++++++++++++++ .../dashboard/dashboard-page.component.ts | 15 +++++++++++ .../pages/dashboard/dashboard-page.module.ts | 17 +++++++++++++ src/app/pages/pages-routing.module.ts | 1 + 8 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 src/app/pages/dashboard/dashboard-page-routing.module.ts create mode 100644 src/app/pages/dashboard/dashboard-page.component.html create mode 100644 src/app/pages/dashboard/dashboard-page.component.scss create mode 100644 src/app/pages/dashboard/dashboard-page.component.spec.ts create mode 100644 src/app/pages/dashboard/dashboard-page.component.ts create mode 100644 src/app/pages/dashboard/dashboard-page.module.ts diff --git a/src/app/commons/component/sidebar/menu-element.ts b/src/app/commons/component/sidebar/menu-element.ts index aa7c163..c833539 100644 --- a/src/app/commons/component/sidebar/menu-element.ts +++ b/src/app/commons/component/sidebar/menu-element.ts @@ -56,7 +56,7 @@ export const menus = [ }, { 'name': 'Dashboards', - 'link': '', + 'link': '/dashboard', 'icon': 'indeterminate_check_box', 'chip': { 'value': 3, 'color': 'accent'}, 'open': false, diff --git a/src/app/pages/dashboard/dashboard-page-routing.module.ts b/src/app/pages/dashboard/dashboard-page-routing.module.ts new file mode 100644 index 0000000..d8ecaac --- /dev/null +++ b/src/app/pages/dashboard/dashboard-page-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import {DashboardPageComponent} from './dashboard-page.component'; + +const routes: Routes = [ + { + path: '', + component: DashboardPageComponent, + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) + +export class DashboardPageRoutingModule { } diff --git a/src/app/pages/dashboard/dashboard-page.component.html b/src/app/pages/dashboard/dashboard-page.component.html new file mode 100644 index 0000000..ec071fe --- /dev/null +++ b/src/app/pages/dashboard/dashboard-page.component.html @@ -0,0 +1,3 @@ +

+ dashboard-page works! +

diff --git a/src/app/pages/dashboard/dashboard-page.component.scss b/src/app/pages/dashboard/dashboard-page.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/pages/dashboard/dashboard-page.component.spec.ts b/src/app/pages/dashboard/dashboard-page.component.spec.ts new file mode 100644 index 0000000..de1ed64 --- /dev/null +++ b/src/app/pages/dashboard/dashboard-page.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DashboardPageComponent } from './dashboard-page.component'; + +describe('DashboardPageComponent', () => { + let component: DashboardPageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ DashboardPageComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(DashboardPageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/dashboard/dashboard-page.component.ts b/src/app/pages/dashboard/dashboard-page.component.ts new file mode 100644 index 0000000..7eaa558 --- /dev/null +++ b/src/app/pages/dashboard/dashboard-page.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'of-dashboard-page', + templateUrl: './dashboard-page.component.html', + styleUrls: ['./dashboard-page.component.scss'] +}) +export class DashboardPageComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/pages/dashboard/dashboard-page.module.ts b/src/app/pages/dashboard/dashboard-page.module.ts new file mode 100644 index 0000000..904bfd7 --- /dev/null +++ b/src/app/pages/dashboard/dashboard-page.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { DashboardPageRoutingModule } from './dashboard-page-routing.module'; +import { MaterialModule } from 'app/commons/ui/material/material.module'; +import {DashboardPageComponent} from './dashboard-page.component'; + +@NgModule({ + imports: [ + CommonModule, + DashboardPageRoutingModule, + MaterialModule, + ], + declarations: [ + DashboardPageComponent + ] +}) +export class DashboardPageModule { } diff --git a/src/app/pages/pages-routing.module.ts b/src/app/pages/pages-routing.module.ts index 80e5982..6a579b1 100644 --- a/src/app/pages/pages-routing.module.ts +++ b/src/app/pages/pages-routing.module.ts @@ -17,6 +17,7 @@ const routes: Routes = [ { path: 'sensor-setting', loadChildren: './sensor-setting/sensor-setting-page.module#SensorSettingPageModule' }, { path: 'target', loadChildren: './target/target-page.module#TargetPageModule' }, { path: 'overview', loadChildren: './overview/overview-page.module#OverviewPageModule' }, + { path: 'dashboard', loadChildren: './dashboard/dashboard-page.module#DashboardPageModule' }, ] } ];