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

How to use with Nuxt JS ? #27

Open
uzzal-ht opened this issue Jul 7, 2020 · 1 comment
Open

How to use with Nuxt JS ? #27

uzzal-ht opened this issue Jul 7, 2020 · 1 comment

Comments

@uzzal-ht
Copy link

uzzal-ht commented Jul 7, 2020

How to use with Nuxt JS ?
Can anyone share an example code?

@mellson
Copy link

mellson commented Oct 29, 2020

@uzzal-ht you need to create a plugin called vuebacktotop.js in your plugins folder.
Add the following content to the file:

import Vue from 'vue'
import BackToTop from 'vue-backtotop'

Vue.use(BackToTop)

Then add this to the plugins section of your nuxt.config.js:

plugins: [
    { src: '~plugins/vue-backtotop.js', ssr: false } // add this line
  ]

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