Last active
January 5, 2018 13:58
-
-
Save ashhitch/fed41447c4ccbaba9ddd9504608bd25d to your computer and use it in GitHub Desktop.
Set default value for <select> in Angular 2+ Reactive Forms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <select formControlName="field"> | |
| <option [ngValue]="null">Select field</option> | |
| <option *ngFor="let property of properties" [ngValue]="property">{{property.name}}</option> | |
| </select> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment