loading...

re: Mastering Angular 8: five things that are good to know to save your time. VIEW POST

FULL DISCUSSION
 

Great article, just a quick comment to say that we shouldn't be encouraging people to use ::ng-deep as it's been deprecated.
Instead, if your style must live outside view encapsulation of your component, consider setting the ViewEncapsulation of your component to None, or placing the style in a global stylesheet.

Link to Angular Docs for reference:
angular.io/guide/component-styles#...

 

There are several components on NPM (github) to use but most have default encapsulation so ng-deep is very useful. Be aware of the next :

If the ::ng-deep combinator is used without the :host pseudo-class selector, the style can bleed into other components.

 

Thanks for sharing!

Code of Conduct Report abuse