Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

use ngfor to make a dropdown in angular from array

<select [(ngModel)]="selected">
  <option *ngFor="let person of people" [ngValue]="person">{{person.name}}</option>
</select>

<div class='show-info'></div>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ngfor #dropdown #angular #array
ADD COMMENT
Topic
Name
4+4 =