I have a simple directive and I would like to add a class to it :
@Directive({
selector: '[appFieldLabel]',
})
export class FieldLabelDirective {
@Input() tooltip: string;
@Input() showOptional = true;
@HostBinding('class.text-truncate')
test = true;
}
this works, but I want it to always be set, is there a way without assigning an useless property like here test = true;
thank you