Could you please tell me, the differences between the below two scss styles? I didn't get the clear idea about this.
:host {
display: inline-block;
/deep/ {
span {
color: red;
}
}
}
:host {
display: inline-block;
::ng-deep {
span {
color: red;
}
}
}
The main difference is, that ::ng-deep
is supported by SASS, while support for /deep/
was removed. This is the reason why ::ng-deep
was added to Angular in addition to /deep/
Besides that, both are deprecated in Angular, because when native shadow DOM support in all browsers becomes usable, they will probably remove ViewEncapsulation.Emulated
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With