When a user click on any of the record they see the details of the record. I wanted to add next and previous control on the details view 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.
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. I tried this but didn't help.
https://stackblitz.com/edit/angular-ivy-1tsz1r?file=src%2Fapp%2Fapp.component.html
Top comments (0)