Answers for "mat selection list form control"

1

mat selection list form control

// component.ts
this.clientForm = this.fb.group( {
    myOtherControl: new FormControl([]) 
});

// component.html
<form [formGroup]="clientForm">
   <pre>
     {{ clientForm.get('myOtherControl').value | json }}
   </pre>

   <mat-selection-list formControlName="myOtherControl">
     <mat-list-option value="SOMETHING3">SOMETHING3</mat-list-option>
     <mat-list-option value="SOMETHING4">SOMETHING4</mat-list-option>
   </mat-selection-list>
</form>
Posted by: Guest on July-24-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language