Here's my .html:
<app-header></app-header>
<div class="content-wrapper" [ngClass]='{"isLoggedIn" : isLoggedIn}'>
<div class="content-wrapper-body">
<router-outlet></router-outlet>
</div>
<app-footer></app-footer>
</div>
My .css (summed up):
:host {
...
.content-wrapper {
...
.content-wrapper-body {
...
}
}
}
.isLoggedIn {
&.content-wrapper {
...
}
.content-wrapper-body {
...
}
}
I want to add a style to app-root (:host) when the child element has the class isLoggedIn
I tried:
:host(.isLoggedIn) {
..
}
and
app-root:has(div.isLoggedIn) {
...
}
But still, no success. Can someone help me?