Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Sanjana

How to use GSAP in Angular 8?

Recommended Posts

I am trying to use GSAP in Angular projects

Link to comment
Share on other sites

Hey Sanjana. You can use GSAP just like any other external JavaScript library in Angular. What specific issues are you running into?

Link to comment
Share on other sites

Hello @ZachSaucier

I am trying like this.

angular.json

 "scripts": [
              "src/assets/js/animation-gsap.js",
              "./node_modules/gsap/src/all.js"
            ]
animation.gsap.js
function f1() {
  let loading = gsap.timeline();
  loading.to('.page', { opacity:0 }, 1);

}

app.component.ts

declare const f1: any;
Link to comment
Share on other sites

That's a peculiar way to do it. Have you already looked at this thread?

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×