Introducing Angular animations
The Angular framework provides an API for handling animations through the @angular/animations npm package. In an Angular CLI project, we do not need to install it separately, as it is automatically available when creating a new Angular app. It provides all the necessary artifacts for performing animations through BrowserAnimationsModule. We need to import this module into AppModule to start using animations in an Angular app:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule...