ngClassdirective changes the
classattribute that is bound to the component or element it's attached to. There are a few different ways of using the directive.
ngClassworks with the
classattribute to combine the final classes.
ngClassdirective by using an expression, we need to wrap the directive name in square brackets. Passing in an array is useful when you want to have a function put together the list of applicable class names.
flatproperties are true, those classes are applied but since
darkis false, it's not applied.