sensors page routing

This commit is contained in:
insanity 2018-02-27 18:48:00 +09:00
parent 0ceb57af47
commit bce371c211
8 changed files with 87 additions and 1 deletions

View File

@ -20,7 +20,7 @@ export const menus = [
},
{
'name': 'Sensors',
'link': '',
'link': '/sensors',
'icon': 'indeterminate_check_box',
'chip': false,
'open': false,

View File

@ -11,6 +11,7 @@ const routes: Routes = [
{ path: 'home', loadChildren: './home/home-page.module#HomePageModule' },
{ path: 'probes', loadChildren: './probes/probes-page.module#ProbesPageModule' },
{ path: 'probe', loadChildren: './probe/probe-page.module#ProbePageModule' },
{ path: 'sensors', loadChildren: './sensors/sensors-page.module#SensorsPageModule' },
{ path: 'discovery', loadChildren: './discovery/discovery-page.module#DiscoveryPageModule' },
{ path: 'map', loadChildren: './infra/infra-page.module#InfraPageModule' },
{ path: 'sensor-setting', loadChildren: './sensor-setting/sensor-setting-page.module#SensorSettingPageModule' },

View File

@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SensorsPageComponent } from './sensors-page.component';
const routes: Routes = [
{
path: '',
component: SensorsPageComponent,
children: [
// { path: '', component: SensorListComponent },
]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class SensorsPageRoutingModule { }

View File

@ -0,0 +1,3 @@
<p>
sensors works!
</p>

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SensorsPageComponent } from './sensors-page.component';
describe('SensorsComponent', () => {
let component: SensorsPageComponent;
let fixture: ComponentFixture<SensorsPageComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SensorsPageComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SensorsPageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,21 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'of-pages-sensors',
templateUrl: './sensors-page.component.html',
styleUrls: ['./sensors-page.component.scss']
})
export class SensorsPageComponent implements OnInit {
tabs = [
{ label: 'Overview', path: '/sensors' },
{ label: 'History', path: '/sensors/history' },
{ label: 'Settings', path: '/sensors/setting' },
];
constructor() { }
ngOnInit() {
}
}

View File

@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MaterialModule } from '../../commons/ui/material/material.module';
import { SensorsPageComponent } from './sensors-page.component';
import { SensorsPageRoutingModule } from './sensors-page-routing.module';
@NgModule({
imports: [
CommonModule,
MaterialModule,
SensorsPageRoutingModule
],
declarations: [
SensorsPageComponent
]
})
export class SensorsPageModule { }