rigor789/vue-scrollto

Not working with Nuxtjs

Open

#311 opened on Jun 26, 2020

View on GitHub
 (3 comments) (0 reactions) (0 assignees)JavaScript (114 forks)batch import
help wantednuxt

Repository metrics

Stars
 (1,966 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Hi,

Nuxt Version: v2.13.0

I can't figure out how to get this working with Nuxt JS.

I've imported the module as stated in the docs.

modules: [ 'vue-scrollto/nuxt', ]

My markup in my component is as follows:

<a href="#" v-scroll-to="'#' + navItem" v-html="navItem" />

As a result, I get the following error and the scroll doesn't work at all.

vue.runtime.esm.js?2b0e:619 [Vue warn]: Failed to resolve directive: scroll-to

Am I missing a step? I am trying to apply the module to a list of LI's, should that cause issues? I think it's a pretty standard use case.

Thanks in advance

Contributor guide