edit dashboard and text widgets
This commit is contained in:
@@ -11,6 +11,6 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div mat-dialog-actions align="end">
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
<button mat-button mat-dialog-close (click)="close()">Cancel</button>
|
||||
<button class="save-button" mat-button mat-dialog-close (click)="onSaveClick()">Save</button>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, ElementRef, ViewChild } from '@angular/core';
|
||||
import { MatDialogRef } from '@angular/material/dialog';
|
||||
import { Component, ElementRef, Inject, ViewChild } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
|
||||
@Component({
|
||||
selector: 'app-add-text-dialog',
|
||||
@@ -10,7 +10,12 @@ export class AddTextDialogComponent {
|
||||
|
||||
@ViewChild('textElement') textElement!: ElementRef;
|
||||
|
||||
constructor(public dialogRef: MatDialogRef<string>){
|
||||
constructor(public dialogRef: MatDialogRef<string|undefined>, @Inject(MAT_DIALOG_DATA) public data: {text: string}){
|
||||
this.text = data.text;
|
||||
}
|
||||
|
||||
close(): void {
|
||||
this.dialogRef.close(undefined);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user