How can refresh a list after a close modal popup in angular?
I am using a list, where the edit button is present, on that button, I passed data to modal popup, update it and close the modal popup, but the list cannot be refresh.
The code on list component is :
- openStudentDialog(rowData: any, statusValue: any): void {
- this.rowRecordId = rowData.recordId;
- this.statusValue = statusValue;
- let dialogRef = this.dialog.open(StudentUpdateDialog, {
- width: '250px',
- data: { recordId: this.rowRecordId, statusValue: statusValue}
- });
- this.getStudentList()
- }
On Dialog Component code is :-
- @Component({
- selector: 'student-update-dialog',
- templateUrl: 'student-update-dialog.html',
- providers: []
- })
- export class StudentUpdateDialog {
- rowData: any = "";
- status: any;
-
- constructor(public dialogRef: MatDialogRef<StudentUpdateDialog >,
- @Inject(MAT_DIALOG_DATA) public data: any) {
- this.rowData = data;
- this.status = this.rowData.statusValue;
- }
-
- onNoClick(): void {
- this.dialogRef.close();
- }
- SuccessUpdate(data: any) {
- }
- }