From the course: Angular: Animations

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Project module configuration

Project module configuration - Angular Tutorial

From the course: Angular: Animations

Start my 1-month free trial

Project module configuration

- [Instructor] To use animations within Angular we first need to import the correct module within our app module class and include within our application. So let's open up app.module and we can see here that there's a number of things already being imported, such as BrowserModule, and Ngmodule. We also have our main application component. And as these are imported, they're also matched with various declarations and imports across the app. What we need to do is make the animations package available for our application through this module. So to do so, I'm going to paste in a snippet here, which imports BroswerAnimationsModule from angular/platform-browser/animations. Now even though we're importing it, it's not quite available for use yet, because we need to add it to our actual imports. So inside of our imports array, we'll just paste that right there, BrowserAnimationsModule alongside of BrowserModule. And then save our app.module. Now this is only compiling successfully, because…

Contents