InterviewHubPRO
Section Overview
Q101

Question 101 of 283

Part 5: Animations, Service Workers, Ivy Engine & Builders (101 - 123)

36%
Angular & Signals (283 Qs)•Part 5: Animations, Service Workers, Ivy Engine & Builders (101 - 123)

What is angular animation?

Angular's animation system is built on CSS functionality in order to animate any property that the browser considers animatable. These properties includes positions, sizes, transforms, colors, borders etc. The Angular modules for animations are @angular/animations and @angular/platform-browser and these dependencies are automatically added to your project when you create a project using Angular CLI.

Practical Code Example

typescript
// Angular Animations: Declarative animation DSL
import { trigger, state, style, transition, animate } from '@angular/animations';

export const fadeInAnimation = trigger('fadeIn', [
  state('void', style({ opacity: 0 })),
  transition(':enter', [animate('300ms ease-in', style({ opacity: 1 }))])
]);