show drop down values from an object array
Is there any possibility wherein I can show the drop down values based on some Interface. The examples show that the drop down will show values only when its in {id:'aaa' , text:'aaa'} format.
My Interface is having many field and I would like to show the drop down values as one of the property in the object .
Is this supported in ng2-select .
(for example in *ngFor , we can loop over array of object and display a particular property name data in the field )
Hi,
Kindly push object as follows.
Mention the property to be displayed in text filed like <span>${row.text}</span>.
arrResponseData.forEach((row) => {
this.items.push({
id: row.id,
text: <span>${row.text}</span>
});
});