If my main/parent component has the following:
<div class="main-wrapper">
<app-inner></app-inner>
</div>
How might I add a class to the component being invoked inside?
The goal is that the app-inner component presents a class when rendered so that I might reference it in my CSS, such as:
<app-inner class="inner-comp">
However, neither this direct placement of the class attribute, nor [className], nor [ngClass] seem to actually add it.
app-inner { width: 100px }classattribute should work on component tags. What style is not applying to your component? Can you share the properties of the CSS classinner-comp?selector-type-no-unknown).<app-inner class="inner-comp">) does not work. When rendered the class attribute is simply not there. It's not a matter of how many properties/rules I have in my CSS.