<h1 mat-dialog-title>Select students</h1>
<div mat-dialog-content>
  <mat-selection-list #selection>
    <mat-list-option *ngFor="let student of allStudents" [value]="student.id">
      {{student.firstname}} {{student.lastname}}
    </mat-list-option>
  </mat-selection-list>
</div>
<div mat-dialog-actions>
  <button mat-button (click)="onNoClick()">Cancel</button>
  <button mat-button [mat-dialog-close]="selection.selectedOptions.selected">Add</button>
</div>