• Overview
@angular/platform-browser/animations

provideAnimations

function
deprecatedsince v20.2

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

Deprecation warning

Use animate.enter or animate.leave instead. Intent to remove in v23

API

provideAnimations

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

@deprecated

Use animate.enter or animate.leave instead. Intent to remove in v23

@returnsProvider[]

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()  ]});
Jump to details