Skip to content

Animation callbacks get called even tho they didnt run #133

Description

@MickL

When having a leave animation the start and end animation

Template:
<div *ngIf="isVisible" [@fadeOutOnLeave] (@fadeOutOnLeave.done)="animDone($event)"></div>

Component:

//...

isVisible = false;

ngOnInit() {
  setTimeout(() => { this.isVisble = true; }, 5000);
  setTimeout(() => { this.isVisble = false; }, 10000);
}

animDone(event: AnimationEvent) {
  console.log('Animation Ended', event);
}

I would assume that animDone() does only gets called after the div has been faded-out. Instead animDone gets called on init already:

fromState: "void"
phaseName: "done"
toState: null
totalTime: 0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions