If you will click on any of the record row you will see the details of the record.
I wanted to add next and previous button on the details of next/previous row without click on top row. So that user don't have to click again back to top row to view details. They can simply use next / previous control to see next and previous record details.
I was trying this but didn't help.
<div *ngIf="isView" class="view-details">
<button (click)="onPrev()">Prev</button>
<button (click)="onNext()">Next</button>
component.ts
current = 0;
prev = -1;
onPrev() {
this.prev = this.allUser.current--;
alert("Prev" + this.prev);
}
onNext() {
this.prev = this.allUser.current++;
alert("Next" + this.prev);
}
Please help me with the solution.
You can view the code here: https://stackblitz.com/edit/angular-ivy-1tsz1r?file=src%2Fapp%2Fapp.component.html