Skip to main content
8 of 16
Some cleanup
Ofer Zelig
  • 17.5k
  • 9
  • 63
  • 94
<h1>My Application</h1>
<select [(ngModel)]="selectedValue">
  <option *ngFor="let c of countries" [ngValue]="c">{{c.name}}</option>
</select>

Plunker example

NOTE: you can use [ngValue]="c" instead of [ngValue]="c.id" where c is the complete country object.

Günter Zöchbauer
  • 661.4k
  • 235
  • 2.1k
  • 1.6k