Remove dialog on save
This commit is contained in:
parent
ce4f2e517c
commit
02535ded5e
@ -35,7 +35,7 @@ export class EditierenComponent implements OnInit {
|
|||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private _snackbar: MatSnackBar,
|
private _snackbar: MatSnackBar,
|
||||||
private _logger: NGXLogger,
|
private _logger: NGXLogger,
|
||||||
private _dialog: MatDialog) {
|
) {
|
||||||
this.route.paramMap.subscribe(paramMap => {
|
this.route.paramMap.subscribe(paramMap => {
|
||||||
this.id = paramMap.get('id');
|
this.id = paramMap.get('id');
|
||||||
if (this.id) {
|
if (this.id) {
|
||||||
@ -105,25 +105,4 @@ export class EditierenComponent implements OnInit {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public saveDialog(feedData) {
|
|
||||||
const dialogRef = this._dialog.open(DialogComponent, {
|
|
||||||
data: {
|
|
||||||
title: 'Neuen Feed erstellen',
|
|
||||||
body: 'Neuen Feed erstellen?',
|
|
||||||
abort: 'Abbrechen',
|
|
||||||
confirm: 'OK',
|
|
||||||
hideAbort: false
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(
|
|
||||||
data => {
|
|
||||||
if (data === true) {
|
|
||||||
// Confirm button was clicked
|
|
||||||
this.saveFeed(feedData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user