I have a component which has a pseudo element class with a border background like so:
styles: [
`
.arrow_box.config::after {
border-bottom-color: attr(data-config-color);
}
`
]
The tag this applies to looks like this:
<div class="arrow_box config" [attr.data-config-color]="(configData && configData.menu_bar_background ? configData.menu_bar_background : '#ebebeb')"></div>
With configData being declared in the component and changing from time to time based on user interaction.
I have looked at these questions:
Bind Angular 2 variable to css pseudo-class content: attr() expression
Dynamically fill css Pseudo-element 'before' content with Angular2
But from both of those questions, I can't seem to deduce what I'm doing wrong. In chrome's inspector, I can see that my ternary operator assignment evaluates to #ebebeb, which is fine, but the .arrow_box.config::after says the value assigned to border-bottom-color is invalid. What am I doing wrong?