Getting list of selected values from Angular 6 mat-selection-list

Try this

<mat-selection-list #list [(ngModel)]="selectedOptions" (ngModelChange)="onNgModelChange($event)">
    <mat-list-option *ngFor="let shoe of typesOfShoes" [value]="shoe">
      {{shoe}}
    </mat-list-option>
</mat-selection-list>

After binding [(ngModel)]="selectedOptions" you can use selectedOptions variable in your component which will have all selected items.

Example:https://stackblitz.com/edit/angular-hdmfwi


In your code value attribute is missing

Replace

<mat-list-option *ngFor="let readingType of readingTypes">

with

<mat-list-option *ngFor="let readingType of readingTypes" [value]="readingType">

and then get selected array in readingTypesSelected ,

readingTypesSelected is mentioned in [(ngModel)]="readingTypesSelected"


This solution is better

selectionChanged(event: MatSelectionListChange): void {
    this.selected = event.options.filter(o => o.selected).map(o => o.value);
}