peshanghiwa / vue-awesome-paginate

The Awesome Vue.js 3 Pagination Library
MIT License
147 stars 21 forks source link

Link URL should allow any string #9

Closed qzminski closed 1 year ago

qzminski commented 1 year ago

I think the link URL should allow any string, not only the one with [page] substring. It should be possible to generate the links also with # href, or any other. Sometimes it's a matter of HTML markup and there doesn't have to be any magic behind the link href computing.

peshanghiwa commented 1 year ago

Hello @qzminski Thanks for the feedback,

The reason behind forcing developers to have a [page] in the string of the URL attribute is that all the pagination components should refer to the pages that they are pointing to, it won't make sense if a static string (without [page]) is applied to all the pagination elements as all of them will point to the same url. And developers don't have direct control over each and every pagination element separately which means they can't generate different strings and assign them to pagination component separately, so i would have to handle the logic in the component side by myself.

EX: if we have page [1,2,3] then page 1 should reference 1 in the url attribute like this https://www.test.com?page=1, same for page 2 and page 3...