Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngAnimate to allow sync animations #2310

@karellm

Description

@karellm

When it comes to animations, it is common to need to either have several animations start at the same time or one after each other. That goes for ngAnimate. Right now, it triggers both enter and leave (in the case of ngView) at the same time.

We can use a timeout on the enter to wait for the leave to finish but that's clearly quite buggy and not ideal.

I think it would be nice to add a configuration in the ngAnimate to tell the animator if we want the leave to trigger the enter automatically when it's done. Something like:

<div ng-view ng-animate="{enter: anim1, leave: anim2, sync: true}"></div>

What do you think? Is that the way you'd implement it?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions