I want to implement pagination for my website and I found a very nice looking example that could be used with Vue.
I have no previous experience with Vue and I cannot make the demo work.
I found the pagination that I would like to use here
Here is the demo that I am trying to make work
I tried following the instructions given in the first link and I got the following code in a .html file:
<!doctype html>
<html lang="en">
<head>
<title>vue-plain-pagination</title>
</head>
<body>
<div id="app">
<p>page: {{ currentPage }}</p>
<v-pagination v-model="currentPage" :page-count="total"></v-pagination>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/vue-plain-pagination"></script>
<script>
Vue.component('v-pagination', window['vue-plain-pagination'])
new Vue({
el: '#app',
data: {
currentPage: 5,
total: 9,
},
})
</script>
</body>
</html>
The resulting webpage from this code just has the text "page: 5" and nothing else, the pagination bar is not displayed. Do you know how I could make the code work as in the demo, I tried changing a few lines of code and looking for tutorials online but without any success.