ng2-select icon indicating copy to clipboard operation
ng2-select copied to clipboard

show drop down values from an object array

Open AngularTx opened this issue 8 years ago • 1 comments

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 )

AngularTx avatar Feb 18 '17 19:02 AngularTx

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> }); });

vabhu3524 avatar Jul 02 '19 11:07 vabhu3524