Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70747

([ngModel]) and ngFor and concat

$
0
0

@david_bc wrote:

Hello everyone.

I have this model :

public attrs_right = {
    attr1_right : "",
    attr2_right : "",
    attr3_right : ""
  };

This 3 “Attrs” are optionnal .I can have for example :

  • attr1_right and attr3_right available
  • attr2_right only etc etc

On my page I want to bind this model on an ion-select

<ion-item no-lines *ngFor="let attr of availableAttrs.getEntries()">
        <ion-label>{{attr.key}}</ion-label>
        <ion-select  ([ngModel])=" 'attrs_right.' + attr.key+ '_right' " >
          <ion-option *ngFor="let option of attr.value.toArray()" [value]="option">{{option}}</ion-option>
        </ion-select>
</ion-item>

My major probleme is to concat in ([ngModel]) … :frowning:
Any help would be very appreciated
Thanks in advance

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70747

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>