1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Jason Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Jason
Guest

Use the safe navigation operator if the value you bind to is passed by an input or fetched by an async call:

<option *ngFor="#m of dateAttributesList?.month" [value]="m.month">{{m}}</option>

[value] only supports string values. If you have object values use [ngValue]

<option *ngFor="#m of dateAttributesList" [ngValue]="m.month">{{m}}</option>

[ngValue] only works with [ngModel]