New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use ScrollMagic with Angular CLI 1.2.0? #779
Comments
I had the same problem and it had to do with the AMD syntax at the beginning of the animation.gsap.js
the define method fails silently |
This workaround is still throwing an error. It is a compile error, and I cannot get past it to troubleshoot anything else. This is the error:
Any ideas? I'm running the latest angular cli:
I added the files to the scripts object in the angular.json file. This seems to work:
I have tested it and they are being loaded in. It seems like this should be fine for scrolling. The debug.addIndicators plugin works fine. I just keep getting errors with the animation.gsap plugin. Here is what my controller looks like:
adding setTween() gives me this error: so the basic problem I can't get around is that the compiler blocks the animation.gsap plugin from working and obviously the setTween() only works if the plugin can run. Again, the debug.addIndicators plugin works fine. I've been searching for two days now and I am at a standstill. Any ideas? Has anyone tried this with the latest angular cli (Angular CLI: 6.0.8)? thanks! |
como fucking mierda hacen marchar el putisimo addIndicators, llevo seven hours trying but not funciona el muy perro |
@construyacol could you stick to french? |
im on the same boat! been searching around how to get through this missing animation.gsap issue.. i've spend hrs already on this :( |
Try reordering the scripts in your angular.json to
Then in your component use
to get the ScrollMagic Object. |
it is, just managed to actually make it work with GSAP as well. in your
and in the component you want to use and since it's from a CDN then shouldn't be any build issues |
with this setup it finally worked for me. also you need to declare TweenMax, Linear and all the other components like ScrollMagic to use them. |
Working example see this #700 (comment) |
Hi, I'm trying to include GSAP with ScrollMagic plugin in Angular 4 project. I'm using Angular CLI version. 1.2.0.
However I'm getting this error:
I've imported all the required packages inside my component:
The text was updated successfully, but these errors were encountered: