Give placeholder to select in Angular 6

后端 未结 7 2511
萌比男神i
萌比男神i 2021-02-19 15:25

I have a select option in which i want to give placeholder which says \"select a category\"

7条回答
  •  后悔当初
    2021-02-19 15:46

    If you want the first value to be selected when Category is still undefined, you can assign the value undefined to the first option with ngValue:

    
    

提交回复
热议问题