I have created a sample stackblitz demo implementing a simple angular material table in the popup component.
I have also taken an empty table where I am pushing the selected table rows from my first table to second empty table.
But the problem is here I am unable to run the stackblitz example, I tried out various ways to fix the issue but I am unable to find the solution.
Can anybody please help me out in resolving the issue "popup undefined"
And also when I am transferring table rows to the empty table , I am unable to select the checkbox in the second table to remove them back in the first table.
Please access my sample demo here.
You have not imported
OpenPopup
in yourmain.ts
.Make the following changes
main.ts:
Import {TableComponent,OpenPopup} from './path'
tableComponent.component.ts
import { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material';
Import your dialog module separately
instead of
Working link : https://stackblitz.com/edit/angular-table-data-swap-y7sbxp?file=main.ts