add discovery popup
This commit is contained in:
parent
a066ffbfbe
commit
108f09f6d1
|
@ -7,7 +7,7 @@ import { AfterContentInit } from '@angular/core/src/metadata/lifecycle_hooks';
|
||||||
templateUrl: './setting.component.html',
|
templateUrl: './setting.component.html',
|
||||||
styleUrls: ['./setting.component.scss']
|
styleUrls: ['./setting.component.scss']
|
||||||
})
|
})
|
||||||
export class SettingComponent implements OnInit, AfterContentInit {
|
export class DiscoverySettingComponent implements OnInit, AfterContentInit {
|
||||||
|
|
||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
||||||
import { SettingComponent } from 'app/packages/sensor/component/setting/setting.component';
|
import { DiscoverySettingComponent } from 'app/packages/sensor/component/setting/setting.component';
|
||||||
import { SettingResultComponent } from 'app/packages/sensor/component/setting-result/setting-result.component';
|
import { SettingResultComponent } from 'app/packages/sensor/component/setting-result/setting-result.component';
|
||||||
|
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
|
@ -14,11 +14,11 @@ import {FormsModule} from '@angular/forms';
|
||||||
FormsModule
|
FormsModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
SettingComponent,
|
DiscoverySettingComponent,
|
||||||
SettingResultComponent,
|
SettingResultComponent,
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
SettingComponent,
|
DiscoverySettingComponent,
|
||||||
SettingResultComponent
|
SettingResultComponent
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
import {MatDialog} from '@angular/material';
|
||||||
|
import { DiscoverySettingComponent } from 'app/packages/sensor/component/setting/setting.component';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'of-sensor-setting-page',
|
selector: 'of-sensor-setting-page',
|
||||||
templateUrl: './sensor-setting-page.component.html',
|
templateUrl: './sensor-setting-page.component.html',
|
||||||
|
@ -7,11 +11,24 @@ import { Component, OnInit } from '@angular/core';
|
||||||
})
|
})
|
||||||
export class SensorSettingPageComponent implements OnInit {
|
export class SensorSettingPageComponent implements OnInit {
|
||||||
|
|
||||||
constructor() { }
|
constructor(public dialog: MatDialog) { }
|
||||||
|
|
||||||
step = 1;
|
step = 1;
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
openDialog(): void {
|
||||||
|
const dialogRef = this.dialog.open(DiscoverySettingComponent, {
|
||||||
|
width: '850px',
|
||||||
|
data: 'this text is dialog!!'
|
||||||
|
});
|
||||||
|
|
||||||
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
console.log('The dialog was closed');
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onNext() {
|
onNext() {
|
||||||
|
@ -21,6 +38,7 @@ export class SensorSettingPageComponent implements OnInit {
|
||||||
|
|
||||||
onCloseCancel() {
|
onCloseCancel() {
|
||||||
// this.dialogRef.close('Cancel');
|
// this.dialogRef.close('Cancel');
|
||||||
|
this.openDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,21 @@ import { SensorModule } from 'app/packages/sensor/sensor.module';
|
||||||
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
||||||
|
|
||||||
|
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
import { DiscoverySettingComponent } from 'app/packages/sensor/component/setting/setting.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
MaterialModule,
|
MaterialModule,
|
||||||
SensorSettingPageRoutingModule,
|
SensorSettingPageRoutingModule,
|
||||||
SensorModule
|
SensorModule,
|
||||||
|
FormsModule,
|
||||||
|
],
|
||||||
|
entryComponents: [
|
||||||
|
DiscoverySettingComponent
|
||||||
],
|
],
|
||||||
declarations: [SensorSettingPageComponent]
|
declarations: [SensorSettingPageComponent]
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user