Topic: Start animation from angular code and get event when animation finished?
EdwardPayne free asked 3 years ago
Let's say I want to start an animation when a certain event occurs in my Angular code. I want to show the user that something happened and I want an animation to start.
I also would like to know when the animation is finished if that's possible.
For the sake of example I want a card to swing. mdb-card class="animated swing"
I know I can use [class.swing]="shouldAnimate == true"
but there should be a better way, right?
To enable those animations you need to add classes to the element, so your solution (or using ngClass) should be the best in this case.
Unfortunately there is no way to listen to animation start and end, if you need such features you should consider using Angular animations.
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 7.4.1
- Device: Any
- Browser: Any
- OS: macOS
- Provided sample code: No
- Provided link: No