반응형
To use Angular Animation we need BrowserModule and BrowserAnimationsModule. These come automatically when you create an Angular application using the Angular CLI
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule
],
declarations: [ ],
bootstrap: [ ]
})
export class AppModule { }
Add the animation you want to use in the module
import { Component, HostBinding } from '@angular/core';
import {
trigger,
state,
style,
animate,
transition,
// ...
} from '@angular/animations';
References
728x90
반응형
'Frontend > Angular' 카테고리의 다른 글
Angular Library - Angular Schematics (0) | 2023.03.31 |
---|---|
Angular Library - Angular PWA (1) | 2023.03.30 |
Angular Library - Angular HttpClient (0) | 2023.03.30 |
Angular Library - Angular Forms (0) | 2023.03.30 |
Angular Library - Angular Router (0) | 2023.03.30 |