Jump to content
GreenSock

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

I need help, I am not able to use animation in multiple routes in Angular

Recommended Posts

It is not working properly. Let me explain

here is code

https://github.com/mishangoti/scroll-component

here is video explanation of the issue

https://www.awesomescreenshot.com/video/2250268?key=4b667fca8dbad42e89d408e58a1b2034

 

1) what ever page route I refresh, animation on that page work very good, but when I navigate to other route from that route it does not work properly, However if  I refresh that route it works good but in other route it does not work as desired. I have given video link for more detail explanation. 
Please help me solve this issue, I can't solve it by my self. 

2) when i switch route for few times all pages animation start working, but it did not work when i refresh and switch route at first time it did not work, then i switch routes few time than animation start working.

Contact: https://api.whatsapp.com/send?phone=919429011743&text=HI&source=&data=&app_absent=

Please contact me if you know the solution.

Link to post
Share on other sites

Hey Mishan and welcome to the GreenSock forums.

 

It looks like you're not killing off the ScrollTriggers that you created like you should be when switching components. Since switching components doesn't actually navigate to a new page the ScrollTriggers still exist unless you kill them off. So killing them off when your component unmounts should fix the issue.

Link to post
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.

×