My component has a variable which is called componentId which is defined as an input of the component:
@Input() public componentId: string;
I want this variable to be interpreted when building the HTML, in order to assign it to the attributename. Something like this:
<customTag name="{{componentId}}"/>
The issue is that customTag has no property name, so when I try to do that I get the exception:
Can't bind to 'name' since it isn't a known property of 'customTag'.
However, if I was doing this:
<customTag name="somename"/>
... in the rendered HTML I can correctly see the attribute name filled with "somename".
What I need is just to use the value of this variable (componentId) as a name of customTag, without need of actually trying to access the property name of the component customTag (on which's code I've no control since it comes from a library).
How can I just read the value of componentId to assign it dynamically to the static attribute name?