Add Next and pevious button in Angular GET API

I display a list of data on my page.
Now the client says display one and then add next and previous button for pev and next.

my code is.

        <div *ngFor="let l of list">        
            <ion-card mode="ios" *ngIf="l.data!=null">
                <ion-card-content>
                  <div class="ion-des" [innerHTML]="l.data| safe"></div>
                </ion-card-content>
            </ion-card>
        </div>

and my typescript code is

 getMenu() {
    this.api
      .get(
        'GetMenuData'
      )
      .then((data: any) => {
        this.list = data.data;
      });
  }

enter image description here

Instead of data 1, data 2, data 3, …, data n
I need to add data 1 and Next and Pevious btn on this page.

Leave a Comment