Is it possible to use directive composition API to provide inputs to component?
@Directive({
selector: '[colorConfig]',
})
class ColorConfigDirective() {
@Input() colorName: string;
}
@Component({
selector: 'my-icon',
standalone: true,
imports: [CommonModule],
templateUrl: './my-icon.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
hostDirectives: [ColorConfigDirective]
})
export class MyIconComponent {
// How to get color passed to ColorConfigDirective here ??? Is it possible?
}
Read through docs, but couldn't spot anything helpful