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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -