I’m trying to apply a class to a component using the host property of the component decorator, but it’s not working.
Here’s the HTML:
<div class="container">
<app-header></app-header>
<div class="content">
<router-outlet/>
</div>
</div>
Here’s the component
@Component({
//...
host: {
'class': 'header-bg'
},
//...
})
export class HeaderComponent {}
And here’s the style:
.header-bg {
background-color: aqua;
}