
I have the ion select and can display as expected but I want to take the partial value of the selected data and put in the ngModel
do you mean like this…
file.ts
selectedmasalahArray = [];
keunggulan = [
{$value:1,name:'harga murah'},
{$value:2,name:'kaulitas baik'},
{$value:3,name:'kemasan menarik'},
{$value:4,name:'promosi penjualan'},
{$value:5,name:'fasilitas lengkap'}
]
file.html
<ion-item>
<ion-label>Masalah</ion-label>
<ion-select [(ngModel)]="selectedmasalahArray" multiple="true" cancelText="cancel" okText="ok">
<ion-option *ngFor="let masalah of keunggulan; let i = index" [value]="{$value: masalah.$value, name: masalah.name}" selected="false">{{masalah.name}}</ion-option>
</ion-select>
</ion-item>
<pre>{{selectedmasalahArray | json}}</pre>
sorry, I mistaken the file I meant like this for file .html