Angular 2 - apply ngIf on host element using @HostBinding
ngIf
is a directive and directives can't be added dynamically. They are only applied if markup added statically to a components template matches the selector.
@HostBinding()
only supports class.
, attr.
, and style.
bindings.