Jump to content
Search Community

Angular2 importing Draggable using ES6

404Assassin 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

I'm able to import and use TweenMax in Angular2 with ES6 and it's working great in the environment.

 

I've include the gsap libs into my build through npm and I'm importing the module using ES6 like so:

/**
* Import Libs
*/
import * as TweenMax from 'gsap';
/**
* Exports for others scripts to use
*/
window.TweenMax = TweenMax;

but when attempting to import the Draggable utility

import * as Draggable from '../node_modules/gsap/src/minified/utils/Draggable.min';

I get the following error: 

Draggable.min.js:15 Uncaught Error: Cannot find module "TweenLite" 

In ES6 do I have to export TweenMax first for the Draggable module or is there another method for making the TweenMax module available for the Draggable module? 

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