Jump to content
Search Community

Oussamalkd

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Oussamalkd

  1. I want to usenuxt-gsap-module on my nuxt app.

    I follow the docs in github : https://github.com/ivodolenc/nuxt-gsap-module

    but I can't acces to this.$gsap in may pages and components, it throws an error :  Property '$gsap' does not exist on type 'XXX'

    my package.json file

     

    "devDependancies" : {

    "nuxt-gsap-module": "1.7.1"

    }

     

    index.vue 

    boxRotation (): void {
        const gsap = this.$gsap
        gsap.to('.box', { rotation: 27, x: 100, duration: 1 })
      }
      mounted () :void {
        this.boxRotation()
      }

     

    nuxt.config.js

     

     

    buildModules: [
        '@nuxt/typescript-build',
        'nuxt-gsap-module'
      ],
    image.png.7974a48138526d9fd66ca6d0aabb574f.png
×
×
  • Create New...