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() //i am using this but it cannot update the list
- }
- @Component({
- selector: 'student-update-dialog',
- templateUrl: 'student-update-dialog.html',
- providers: []
- })
- export class StudentUpdateDialog {
- rowData: any = "";
- status: any;
- constructor(public dialogRef: MatDialogRef
, - @Inject(MAT_DIALOG_DATA) public data: any) {
- this.rowData = data;
- this.status = this.rowData.statusValue;
- }
- onNoClick(): void {
- this.dialogRef.close();
- }
- SuccessUpdate(data: any) {
- }
- }
Mahesh VermaPosted May 1, 2018, 7:58 AM
Reena LakraPosted May 1, 2018, 8:09 AM