Angular comes with a predefined animation framework that is contained in the '@angular/animations' package. The first step for using animations in Angular is to import BrowserAnimationsModule from '@angular/platform-browser/animations' in the main application module (app.module.ts), since it works as an interface with the browser for the animation's execution:
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
...
@NgModule({
...
imports: [
...
BrowserAnimationsModule
Let's do this in the AdvamcedFeatures project. Then, all animations used by a component are placed in the animations property of its @Component decorator:
@Component({
...
animations:[
//animations go here
]
The code that defines each animation may be placed inline inside the animations array, or it may be assigned...