Shadow DOM Strategies in Angular 2

added by bpwndaddy
6/29/2015 3:58:12 PM

1 Kicks, 352 Views

In our article on styling Angular 2 components we learned how styles are applied to our component when defining them in different ways. We mentioned that all our component styles are appended to the document head, but usually would end up in the component’s template, in case we use native Shadow DOM. This article explains not only how we can tell Angular to use native Shadow DOM, but also what the other Shadow DOM solutions are, that the framework comes with and why they exist.