WAAPI in Angular
Learn how to use WAAPI in an Angular application and how to listen to WAAPI's animation events.
We'll cover the following
To use WAAPI in Angular, we’ll need access to the element we want to animate. We can do this by giving the element an ID and using Angular’s ViewChild
decorator. Instead of using the document’s DOMContentLoaded
event, we can use Angular’s AfterViewInit
lifecycle hook to trigger the animation. The rest of the WAAPI code is identical to the non-Angular version.
Get hands-on with 1200+ tech skills courses.