The ngStyle directive allows you to modify the style of an HTML element using the expression. In this tutorial, we will look how to use ngStyle with few examples. Using ngStyle you can dynamically change the style of your HTML element. You also can bind these properties to components properties.
In this Introduction to Angular 2 Directive, we are going to look at the Angular Directives. We will look at three types of directives that angular supports like Component, Structural and Attribute Directives. We also look the few of the most commonly used Angular2 directives.