Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
Say hello to Angular's future home!Check out Angular.devHome
/

provideAnimations

Returns the set of dependency-injection providers to enable animations in an application. See animations guide to learn more about animations in Angular.

      
      provideAnimations(): Provider[]
    
Parameters

There are no parameters.

Returns

Provider[]

Usage notes

The function is useful when you want to enable animations in an application bootstrapped using the bootstrapApplication function. In this scenario there is no need to import the BrowserAnimationsModule NgModule at all, just add providers returned by this function to the providers list as show below.

      
      bootstrapApplication(RootComponent, {
  providers: [
    provideAnimations()
  ]
});