Monaca Onsen UI Discord Chat Github Repo

Onsen + Angular with "ons-select" on change



  • Hi everyone, i’m new with OnsenUI and have a very poor experience with angular in general.
    I’m trying to develop a select-option template that catches data from my server and populate a list based on selected option value. Here it is my code:

    <ons-select id="selectValue" [(ngModel)]="selectedValue" [attr.item]="selectedValue">
       <option *ngFor="let item of valuesList" [value]="item">
             {{ item.name }}
       </option>
    </ons-select>
    

    I would like to put data that are inside “selectedValue” model into an “ons-list”:

    ...
    <ons-list-item style="padding-left: 0px" *ngFor="let item of selectedValue">
       <h2>{{item.title}}</h2>
       <p>{{item.message}}{{item.value}}</p>
    </ons-list-item>
    ...
    

    If you need more information to give me help, ask here… i will edit this message with new information. Hope everything is clear and that someone can help me.