This must be used in the class attribute and must be the only part used in
the attribute. It takes each property in the classInfo argument and adds
the property name to the element's classList if the property value is
truthy; if the property value is falsy, the property name is removed from
the element's class.
For example {foo: bar} applies the class foo if the value of bar is
truthy.
A directive that applies dynamic CSS classes.
This must be used in the
classattribute and must be the only part used in the attribute. It takes each property in theclassInfoargument and adds the property name to the element'sclassListif the property value is truthy; if the property value is falsy, the property name is removed from the element'sclass.For example
{foo: bar}applies the classfooif the value ofbaris truthy.