Created
January 5, 2018 13:59
-
-
Save ashhitch/6b4c8d1631e6e0d8892f0a633a21b41c to your computer and use it in GitHub Desktop.
Set default value for <select> in Angular 2+ Template Driven 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 [ngModel]="field ||''"> | |
| <option value="">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