Frontend/Angular

Angular Library - Angular Animations

Jin-Co 2023. 3. 30. 15:50
반응형

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

 

Angular

 

angular.io

 

728x90
반응형