I am using the CSS content property content: attr(myValue); in an Angular 7 component's .css file
&::before {
content: attr(myValue);
position: absolute;
left: 2em;
font-weight: bold;
top: 1em;
display: block;
font-family: 'Roboto', sans-serif;
font-weight: 700;
font-size: .785rem;
}
which is connected to a string value in the component's .html file like this:
<div class="timeline-item" myValue='Can I use an interpolated value here instead?'>
...
</div>
I want to insert an interpolated string value in the myValue in the .html. I have tried the various bind techniques outlined in the official Angular template syntax guide without any success.
Is there a way to insert the interpolated value in myValue? In other words, can I do the equivalent of this:
<div class="timeline-item" myValue='{{myInterpolatedString}}'>
...
</div>
attr.myValue="{{observation.observationDateTime}}. I am sure I had tried that because it is included in the Angular guidance I quoted in my question