Need help grasping the concept behind the @Hostbinding
argument:
Snippet of the code:
import { Directive, HostBinding } from "@angular/core";
@Directive({
selector: '[appDropdown]'
})
export class DropdownDirective {
@HostBinding('class.open') isOpen = false;
}
Why is 'class.open' used as the argument in @Hostbinding()
? It seems like treating class as an object.