got to the previous page in history after device was added
parent
4a5a146536
commit
21ae056716
|
@ -1,4 +1,3 @@
|
|||
|
||||
<!-- Show a horizontal stepper on larger devices -->
|
||||
<mat-horizontal-stepper *ngIf="!alignVertical" labelPosition="bottom">
|
||||
<!-- Use font awesome icons in the stepper to indicate progress -->
|
||||
|
@ -59,7 +58,7 @@
|
|||
<account-device-add-complete [wakeWord]="deviceForm.controls['wakeWord'].value">
|
||||
</account-device-add-complete>
|
||||
<div fxLayout="row" fxLayoutAlign="end">
|
||||
<button mat-button>FINISHED</button>
|
||||
<button mat-button (click)="onFinished()">FINISHED</button>
|
||||
</div>
|
||||
</mat-step>
|
||||
</mat-horizontal-stepper>
|
||||
|
@ -124,7 +123,7 @@
|
|||
<account-device-add-complete [wakeWord]="deviceForm.controls['wakeWord'].value">
|
||||
</account-device-add-complete>
|
||||
<div fxLayout="row" fxLayoutAlign="end">
|
||||
<button mat-button>FINISHED</button>
|
||||
<button mat-button (click)="onFinished()">FINISHED</button>
|
||||
</div>
|
||||
</mat-step>
|
||||
</mat-vertical-stepper>
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { MediaChange, MediaObserver } from '@angular/flex-layout';
|
||||
import {
|
||||
FormBuilder,
|
||||
FormGroup,
|
||||
Validators
|
||||
} from '@angular/forms';
|
||||
import {FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { faCheck } from '@fortawesome/free-solid-svg-icons';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
import { AccountPreferences } from '../../../../shared/models/preferences.model';
|
||||
import { DeviceService } from '../../../../core/http/device.service';
|
||||
import { AccountDefaults } from '../../../../shared/models/defaults.model';
|
||||
import { AccountDefaults } from '@account/models/defaults.model';
|
||||
import { AccountPreferences } from '@account/models/preferences.model';
|
||||
import { DeviceService } from '@account/http/device.service';
|
||||
|
||||
@Component({
|
||||
selector: 'account-device-add',
|
||||
|
@ -114,4 +110,8 @@ export class DeviceAddComponent implements OnInit {
|
|||
onDefaultsSubmit() {
|
||||
this.deviceService.addAccountDefaults(this.defaultsForm).subscribe();
|
||||
}
|
||||
|
||||
onFinished() {
|
||||
window.history.back();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue