Back to Browse

Host binding animations in Angular

1.7K views
Oct 20, 2023
6:09

Angular provides many ways to animate things. πŸš€ Want to master Angular Signal Forms? I just released a full course where we build a real Signal Form step-by-step covering validation, async validation, dynamic fields, custom controls, and submission patterns. πŸ‘‰ Enroll here: https://www.udemy.com/course/angular-signal-forms/?couponCode=021409EC66FC6440B867 In this video we look specifically at adding enter and leave animations to a component as it gets added and removed from the DOM. We do this with the Angular @HostBinding decorator and the :enter and :leave aliases for animations. Additionally, we look at an example reacting to Angular animation start and done callback events on the component host with the @HostListener decorator. Alright, let’s check it out! ------------------------------------------------------------------------------ πŸ“Ί More Angular CDK Overlay Tutorial Videos: https://www.youtube.com/playlist?list=PLp-SHngyo0_iun9oglT2boNYebJ1Yv-GT ------------------------------------------------------------------------------ πŸ”— Demo Link: https://stackblitz.com/edit/stackblitz-starters-z3wpc9?file=src%2Fmain.ts ------------------------------------------------------------------------------ πŸ“– Chapters: 0:00 – Introduction 0:43 – :enter and :leave Animation Example 1:17 – Adding an Angular Animation Trigger 1:41 – Using the Angular @HostBinding Decorator to Bind an Enter and Leave Animation to a Component Host 3:09 – Fixing Enter and Leave Animations within an Angular ngFor 4:13 – Reacting to Animation Start and Done Callback Events on a Component Host using the Angular @HostListener decorator ------------------------------------------------------------------------------ #angular #angulartutorial #animation

Download

0 formats

No download links available.

Host binding animations in Angular | NatokHD