Jump to content
Search Community

Using with Angular5/6

fatnjazzy test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Thanks, Ill wait for his response.

 

Also, im importing 

import * as Draggable from "gsap/Draggable";

 

and im getting this error:

 

Quote

AppComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: gsap_Draggable__WEBPACK_IMPORTED_MODULE_1__.create is not a function
    at AppComponent.push../src/app/app.component.ts.AppComponent.ngOnInit (app.component.ts:52)
    at checkAndUpdateDirectiveInline (core.js:9251)
    at checkAndUpdateNodeInline (core.js:10515)
    at checkAndUpdateNode (core.js:10477)
    at debugCheckAndUpdateNode (core.js:11110)
    at debugCheckDirectivesFn (core.js:11070)
    at Object.eval [as updateDirectives] (AppComponent_Host.ngfactory.js? [sm]:1)
    at Object.debugUpdateDirectives [as updateDirectives] (core.js:11062)
    at checkAndUpdateView (core.js:10459)
    at callWithDebugContext (core.js:11352)

 

Link to comment
Share on other sites

7 hours ago, fatnjazzy said:

Thanks, Ill wait for his response.

 

Also, im importing 

import * as Draggable from "gsap/Draggable";

 

 

That works when importing Draggable with TypeScript with older versions of GSAP or when using the umd versions. If you're using the latest version of GSAP (2.0.1), try importing like this.

import Draggable from "gsap/Draggable";

 

And there won't be any auto-complete for Draggable. If you get errors, the simplest way to silence is to add this to your code.

declare var Draggable;

 

  • Like 4
Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

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.
×
×
  • Create New...