Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

History tracking #25

Open
mitchellholzmann opened this issue Dec 8, 2016 · 1 comment
Open

History tracking #25

mitchellholzmann opened this issue Dec 8, 2016 · 1 comment

Comments

@mitchellholzmann
Copy link

Hi,

I was wondering if it was possible to build in any type of history tracking, possibly through vue router.
Would be a great addition to user experience.

Thanks!

@coderofsalvation
Copy link

I've achieved this by adding these bits:

<paginate ref="paginator"   .....>
  ...
</paginate>
<paginate-links @change="onPageChange"  ..>
...
</paginate-links>

and the js:

methods:{
  onPageChange(){
      // use settimeout because onPageChange is called right before it goes to the next page
      setTimeout( () => this.$router.push({path:'/?p='+this.$refs.paginator.currentPage}), 100 )
  },
  ....
}

cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants