How do you create pagination for a single page nuxt.js app?

My solution when I tried vue with its script inserted directly is mount the function that places the pagination at mounted, while the function returns the html code directly (so I could not use @onclick, I use onclick while the referenced function is global scope).

Recently I switched to nuxt.js and found that the original code doesn’t work anymore, the pagination won’t show in the corresponding div. Since it’s SSR, I could not reference any of the function or data in the template. So I wonder in nuxt.js, what’s the proper way to do pagination without navigating between different pages without referencing the vue.js in the html code?

1 Like