Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49184

Unlimited level list for Menu

$
0
0

@aditya_1027 wrote:

I want to create a menu in sidebar. In which we will have unlimited level of subcategories. Please guide me if anyone know how can i do this in ionic 3.

This is my code and i want to change it to unlimited level subcategories;

    <ion-list>
      <ion-item menuClose *ngFor="let p of categories; let i = index" (click)="openPage(p)">
        {{p.name}}
        <ion-icon *ngIf="p.subcategories.length" name="ios-arrow-forward" item-end></ion-icon>
        <div *ngIf="p.subcategories.length">
          <ion-item *ngFor="let s of p.subcategories">
            {{s.name}}
            <ion-icon *ngIf="p.subcategories.length" name="ios-arrow-forward" item-end></ion-icon>
          </ion-item>
        </div>
      </ion-item>
    </ion-list>```

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49184

Trending Articles



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