I want to set a css variable in my TS component, and set the value to an Input(). Heres what I have that isn't working:
@HostBinding('style.--customVar') @Input() myInput = 'val';
So I want the html to look like:
<my-component style="--customVar:val"></my-component>
But my host binding does not seem to trigger. I know I have the hostBinding set up properly because if I do something like:
@HostBinding('style.backgroundColor') @Input() myInput = 'black';
It works fine. Any suggestions?