Native encapsulation using Shadow DOM

As an alternative to the CSS Encapsulation, Angular also features another great namespace-like feature using its unique Shadow DOM implementation.

Explaining what the Shadow DOM actually is in a few words is another impossible task, yet we'll try to do that nonetheless; Shadow DOM is one of the four Web Component standards, along with HTML Templates, Custom Elements, and HTML Imports. It allows whoever uses it (the developer or the underlying framework) to hide DOM logic behind other elements, thus enabling--among many other things--CSS scoping and DOM encapsulation.

If you want to know more about Web Component and Shadow DOM, we strongly suggest that you read this awesome article by Eric Bidelman at ...

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.