I have component in Angular 2 called my-comp:
<my-comp></my-comp>
How does one style the host element of this component in Angular 2?
In Polymer, You would use ":host" selector. I tried it in Angular 2. But it doesn't work.
:host {
display: block;
width: 100%;
height: 100%;
}
I also tried using the component as selector:
my-comp {
display: block;
width: 100%;
height: 100%;
}
Both approaches don't seem to work.
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…