I have created a component whose sole purpose is to display the color palette hues for a given palette (primary, secondary, accent, emphasis, warn)
I want to allow the component to be added to any page using the component template (my-color-palette-component) and color attribute (primary, secondary, accent, etc) specified as:
<my-color-palette-component color="primary"></my-color-palette-component>
How can I retrieve the value of the color attribute and insert it into my component.html as the class attribute?
Example, in my my-color-palette-component.component.html code:
<div class={{this.color?}}>
...markup
</div>
So that the DOM markup becomes:
<div class="primary">...markup</div>