Creating and reusing stunning animations
In the previous sections, you’ve seen how to manipulate DOM elements using directives and how to transform template values using pipes; in this section, you will learn how to create animations for your HTML elements and components using the built-in animation module.
To start, you have to enable the animation module. To do this, go to app.config.ts in your applications under the expenses-registration application in your Nx monorepo. Inside app.config.ts, you’ll find the appConfig object used in your main.ts inside the bootstrapApplication function. To enable the animation module, add the provideAnimations() function inside the providers array of the appConfig object like so:
provideAnimations(),
If you’re using an NgModule-based application, you need to import BrowserAnimationsModule inside the NgModule where you want to use animations. After adding either the provideAnimations function or BrowserAnimationsModule...