mat selection list form control

Solutions on MaxInterview for mat selection list form control by the best coders in the world

showing results for - "mat selection list form control"
Francisco
10 Jun 2020
1// component.ts
2this.clientForm = this.fb.group( {
3    myOtherControl: new FormControl([]) 
4});
5
6// component.html
7<form [formGroup]="clientForm">
8   <pre>
9     {{ clientForm.get('myOtherControl').value | json }}
10   </pre>
11
12   <mat-selection-list formControlName="myOtherControl">
13     <mat-list-option value="SOMETHING3">SOMETHING3</mat-list-option>
14     <mat-list-option value="SOMETHING4">SOMETHING4</mat-list-option>
15   </mat-selection-list>
16</form>