What is NgStyle in Angular 10 ?
In this article, we are going to see what is NgStyle in Angular 10 and how to use it.
NgStyle is used to add some style to an HTML element
<element [ngStyle] = "typescript_property">
- Create the Angular app to be used
- In app.component.html make an element and sets its class using ngStyle directive
- Serve the angular app using ng serve to see the output