Open In App

Angular10 animation Style API

In this article, we are going to see what is Style in Angular 10 and how to use it.

The Style in Angular10 is used to create a key/value object containing CSS properties/styles that can be used for an animation state.



Syntax:

Style(tokens)

NgModule: Module used by Style is:



  
 

Approach: 

 

 

Parameters:

 

 

Return Value:

 

 

Example 1:

 

app.module.ts
 


 
app.component.ts
 


 

 

 

app.component.html
 


 

 

 

Output:

 

 

Reference: https://angular.io/api/animations/style

 

Article Tags :