Answers for "bind select to ngmodel"

1

[(ngModel)] in a select

<select name="miselect" [(ngModel)]="seleccionados" multiple="multiple">
    <option [value]="item" *ngFor="let item of lista">{{item}}</option>
</select>
Posted by: Guest on March-02-2021
0

angular select ((ngmodel selected))

[ngValue]="Var" my variable in typescript.components to verify ID  
<select type="number" [(ngModel)]="selectedLevel">
  <option *ngFor="let level of levels" [ngValue]="Var">{{level.name}}</option>
</select>
Posted by: Guest on March-31-2022

Browse Popular Code Answers by Language