Topic: Start animation from angular code and get event when animation finished?
                  
                  EdwardPayne
                  free
                  asked 6 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?
                      
                      Arkadiusz Idzikowski
                      staff
                        answered 6 years ago
                    
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.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: 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