angular-animations icon indicating copy to clipboard operation
angular-animations copied to clipboard

The provided animation trigger "enter" has not been registered!

Open Atosito opened this issue 4 years ago • 1 comments

Hi there.

I am trying to replicate example of how animate until a variable is false and I only make it works with bounce animation. When I try with fadein or another is says: The provided animation trigger "enter" has not been registered!

My code:

component.html <div [@fadeInOnEnter]="animState" (@fadeInOnEnter.done)="onAnimationEvent($event)" class="app-logo"></div>

component.ts

import { fadeInOnEnterAnimation} from 'angular-animations';
animations: [
    fadeInOnEnterAnimation({ duration: 1000, delay: 2000 }),
  ]

Atosito avatar May 26 '21 21:05 Atosito

Hello!

Try this:

Place this on the HTML element <div *ngIf="condition" [@enter] [@leave]>

and this in the component animations: [ rollInOnEnterAnimation({anchor: 'enter'}), rollOutOnLeaveAnimation({anchor: 'leave'}) ]

MeanChicken avatar Sep 20 '22 19:09 MeanChicken