[Vuejs]-How can I do the previous and next on pagination in Vue.js?

0👍

You’re just incrementing/decrementing the startIndex in previous and next method. Instead you could do something like this:

previous : function() {
    this.pagination(this.currentPage - 1);
},
next : function() {
    this.pagination(this.currentPage + 1);
}

Leave a comment