'How to populate one mat table from another mat table - Angular

I need to populate the Email mat table(Table 2) based on the value selected from the List table(Table 1). For eg., If I check the List 1 check box, all the emails that are in List 1 should be displayed in the Email Table ([email protected]). When I uncheck the List 1 checkbox, the email in the 2nd table should be removed. Can you please help me with this?

Stackblitz URL : https://stackblitz.com/edit/angular-mklwgz-wubrqn?file=src/app/table-selection-example.html



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source