Skip to content
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

Animation not take effect when Scrolling #75

Open
abed-ctrl opened this issue Jan 8, 2021 · 1 comment
Open

Animation not take effect when Scrolling #75

abed-ctrl opened this issue Jan 8, 2021 · 1 comment

Comments

@abed-ctrl
Copy link

abed-ctrl commented Jan 8, 2021

Hello,

All animations in the page runs in the same time. how we can run animations on scrolling page.

Example : https://stackblitz.com/edit/angular-ivy-vxaiuz?file=src/app/app.component.ts

@filipows
Copy link
Owner

filipows commented Jan 13, 2021

Hi @abed-ctrl,

thank you for your question. In the library there are 2 types of animations (from the triggers point of view):

  1. triggered by on enter / on leave events (whenever element enters or leaves the DOM), i.e.
<div *ngIf="CONDITION" [@fadeInOnEnter]></div>
  1. triggered by state changes (when a boolean variable state changes from false <-> true), i.e.
<div [@rubberBand]="rubberState"></div>

You could use either of those for triggering an animation on scroll events.
If you shared a bit more details about your use case, I could try to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants