Relative Content

Tag Archive for htmlangulartypescriptangular-material

Selecting/deselecting ‘ALL’ in Angular 18 select menu should select/deselect all the choices

I’ve been trying to create a feature within a multiple-select menu (mat-select) in Angular 18 for a website I’ve been building, where if I pressed the ‘ALL’ option in the menu, it should select all the modules in the menu. If I deselect ‘ALL’, it should also deselect all of the modules in the menu. I’m able to succesfully get the former function (selects all modules), but I can’t seem to get the latter function (deselect all modules) working. Here is my HTML: