Question: What is the HostBinding decorator doing in this directive?

  1. It is adding the CSS class named highlighted to any DOM element that has the appHighlight directive on it.
  2. HostBinding does not do anything on directives, only on components.
  3. It is specifying if the host element gets the highlighted class added to its class attribute, then the directive class field highlight will get set to true; and if it is not added on the host it will get set to false.
  4. It is creating an inline style on the host element with a CSS property named highlight set to true.

Answer: The correct answer of the above question is Option A:It is adding the CSS class named highlighted to any DOM element that has the appHighlight directive on it.