Hi there,
I know this is a noob question, but I hope you can assist me in anyway.
Setup, I use endpoint to retrieve array of data, then I want to display that data in a .
I have also manually setup an user array as a demo to test.
If I console log out the response i get the following:
Here is the code:
this.http.get(this.GetOptionsURL, this.postData).toPromise().then(resData => {
console.log('RETRIEVED: ', resData);
this.Options = [resData];
});
this.users = [
{
id: 1,
first: 'Alice',
last: 'Smith',
},
{
id: 2,
first: 'Bob',
last: 'Davis',
},
{
id: 3,
first: 'Charlie',
last: 'Rosenburg',
}
];
console.log('USERS: ', this.users);
then the code in my html:
<ion-select>
<ion-select-option *ngFor="let item of Options">{{item.place + ' ' + item.place}}</ion-select-option>
</ion-select>
but this gives me the following result:
I tried an option with a keyvalue pair, but that also didn’t turn out so good…
Can anyone please assist me and guide me on where I am making the mistake?
Thank you in advance!