Quantcast
Viewing all articles
Browse latest Browse all 70877

Ion Segment - Ionic 2 - Bug? not working when assign value a variable from ngfor

@JosephMendez wrote:

No error showing the switching is not working.

`

     <div padding>
     <ion-segment  [(ngModel)]="homeSegment" (change)="onSegmentChanged($event)"     danger>
    <ion-segment-button *ngFor="#item of fetchCatch; #x = index" [value]="x" secondary>
    {{item.name}}
   </ion-segment-button>
   </ion-segment>
 </div>
 <div [ngSwitch]="homeSegment">
   <ion-list *ngFor="#itemx of fetchCatch; #i = index" *ngSwitchWhen="'i'">
     <ion-item *ngFor="#itemchild of itemx.children" (click)="categoryDetails(itemchild)">
       <h2>{{itemchild.name}}</h2>
     </ion-item>
   </ion-list>
  </div>`

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70877

Trending Articles