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',
|
||||
styleUrls: ['./setting.component.scss']
|
||||
})
|
||||
export class SettingComponent implements OnInit, AfterContentInit {
|
||||
export class DiscoverySettingComponent implements OnInit, AfterContentInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
|
|||
import { CommonModule } from '@angular/common';
|
||||
|
||||
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 {FormsModule} from '@angular/forms';
|
||||
|
@ -14,11 +14,11 @@ import {FormsModule} from '@angular/forms';
|
|||
FormsModule
|
||||
],
|
||||
declarations: [
|
||||
SettingComponent,
|
||||
DiscoverySettingComponent,
|
||||
SettingResultComponent,
|
||||
],
|
||||
exports: [
|
||||
SettingComponent,
|
||||
DiscoverySettingComponent,
|
||||
SettingResultComponent
|
||||
]
|
||||
})
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
import {MatDialog} from '@angular/material';
|
||||
import { DiscoverySettingComponent } from 'app/packages/sensor/component/setting/setting.component';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'of-sensor-setting-page',
|
||||
templateUrl: './sensor-setting-page.component.html',
|
||||
|
@ -7,11 +11,24 @@ import { Component, OnInit } from '@angular/core';
|
|||
})
|
||||
export class SensorSettingPageComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
constructor(public dialog: MatDialog) { }
|
||||
|
||||
step = 1;
|
||||
|
||||
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() {
|
||||
|
@ -21,6 +38,7 @@ export class SensorSettingPageComponent implements OnInit {
|
|||
|
||||
onCloseCancel() {
|
||||
// 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 { FormsModule } from '@angular/forms';
|
||||
import { DiscoverySettingComponent } from 'app/packages/sensor/component/setting/setting.component';
|
||||
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
SensorSettingPageRoutingModule,
|
||||
SensorModule
|
||||
SensorModule,
|
||||
FormsModule,
|
||||
],
|
||||
entryComponents: [
|
||||
DiscoverySettingComponent
|
||||
],
|
||||
declarations: [SensorSettingPageComponent]
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user