angularjs - How to set index on sidemenu Ionic -
i have project fetches data wordpress using loop category wordpress , put side menu don't know how index of array , customize 1 one
ionic side menu code
<ion-list> <button color="primary" menuclose ion-item *ngfor="let p of pages" (click)="openpage(p)"> <ion-icon name="add" item-left></ion-icon> {{p.title}} </button> </ion-list>
loop using
api.category().subscribe(datas =>{ //title: datas[1].name //id: datas[0].id (let of datas){ this.pages.push({ title : i.name, id:i.id })
Comments
Post a Comment