Dropdown list under <ion-list>


#1

Hi

I tried to create selection list under my list , but very time i run it, the list show empty.

image

but it will work when i changed into

Appreciate your advise.


#2

All your ion-item selects you create are linked to the same rating model in your first code screenshot.

PS: Posting screenshots of code is terrible. Please post the actual code and format it using the </> button.


#3

are you saying to split under different ion-item?

PS : i tried to put my code in text but it doesn’t seems right.

Blockquote


<ion-item text-wrap *ngFor=“let item of newsData” >

{{item.NEWS_TITLE}}


{{item.NEWS_DATE}}


{{item.NEWS_CATEGORY}}


<button ion-button small (click)=“submitRt($event,item)”>SUBMIT

1 star
2 star
3 star
4 star
5 star

</ion-item>    

#4

Use the button right to the one you used. It has a tooltip “preformatted text” and has a </> on it.

No, you have many of them as your are generating one for each item in newsData. But you are linknig all the ion-selects to the same model rating.