Answers for "ngFor select option angular 9"

1

ngfor select angular

<select [(ngModel)]="passenger.Title">
    <option *ngFor="let title of titleArray" [value]="title.Value">
      {{title.Text}}
    </option>
</select>
Posted by: Guest on April-29-2020
1

ngfor in select

//angular
<select [(ngModel)]="passenger.Title">
    <option *ngFor="let title of titleArray" [value]="title.Value">
      {{title.Text}}
    </option>
</select>
Posted by: Guest on November-12-2020
0

select with ngFor on option and ul

<div>
    <ul *ngFor="let sentence of sentences;let i = index;" class="collection">
        <li class="collection-item">
            <p [ngClass]="{'red': sentence?.disco == 1 , 'green': sentence?.disco == 2 }">{{sentence.viewValue}} </p>
            <p style="margin-left:20px; font-size:12px!important">
                <select #val (change)="onChange(val.value,i)">
            <option *ngFor="let cat of foods" [value]="cat.value" >
            {{cat.viewValue}}
            </option>
            </select>
         </p>
      </li>
   </ul>
</div>
Posted by: Guest on May-29-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language