Dynamic value binding issue to *ngSwitchCase in ion-segment

``<div [ngSwitch]=“product” *ngFor=“let segment of productcategory”>
<ion-list class=“no_rl_margin” *ngSwitchCase="’{{segment.name}}’">
<ion-item *ngFor=“let item of segment.products” class=“product_item”>

` .............................. ERROR Error: Uncaught (in promise): Error: Template parse errors: Can't bind to '*ngSwitchCase' since it isn't a known property of 'ion-list'
                            Thanks in Advance..

Blockquote

i am facing the same problem. please suugest ans if anyone got?

Remove the {{ }} from the *ngSwitchCase. Let it look like this – *ngSwitchCase="{{segment.name}}".

Below is an example. Hope it works for you.


<div [ngSwitch]="product"  class="segmentItem" *ngFor="let key of keys">
   <ion-list *ngSwitchCase="key.category"> 
   </ion-list>
</div>
1 Like

@vibinflogesoft @Cruzz1785 was the solution helpful in solving your problem regarding the *ngSwitchCase in ion-segment ?

1 Like

@Shequeri Thanks for Your reply:smiley:
I solved my issue using ionic segment slider https://gist.github.com/aarjithn/d282b019f6046f0de2f0ded623554313