Notice that binding a directive works the exact same way as component attribute bindings. Here, we're binding an expression, an object literal, to the
ngStyle directive so the directive name must be enclosed in square brackets.
ngStyle accepts an object whose properties and values define that element's style. In this case, we can see that both kebab case and lower camel case can be used when specifying a style property. Also notice that both the html
style attribute and Angular
ngStyle directive are combined when styling the element.