Preetham Thangamma

Preetham Thangamma

  • 1.9k
  • 116
  • 2.6k

How to write "option" to read data for dropdown in angular

Mar 3 2021 9:52 AM
Good Afternoon,
 
Below is the code to read the data from database:
  1. while (dr.Read())  
  2. {  
  3. pROScrutinyDetails.type_treat = obj_DbNullHandler.CheckDBNullAndReturnNullableStringForDataReader(dr, "type_treat");  
  4. }  
and it is reading 3 values and i want display as a dropdown showing all 3 values....so please do let me know how to write the <option> for the same!!
 
i tried the below but it is not working:
 
<option [value]="item.type_treat" *ngFor="let item of f">{{item.type_treat}}</option>
 
Thank you

Answers (3)