Native Shadow DOM vs Angular's Emulated Shadow DOM

preview_player
Показать описание
In Angular, components styles can be encapsulated. There are three different encapsulation strategies available. None, Emulated and ShadowDom.
None is probably the least interesting. It just disables encapsulation completely. But what is the difference between Emulated and ShadowDom?Let’s find out!
Рекомендации по теме
Комментарии
Автор

for me, the part was that t summary at the end:
emulated :
accept styling from outside
don't send styling to outside
native(it's now deprecated and u should use shadowdom):
is locked from both ways.
not effecting and not accepting style.(it's isolated interm of styling)

miladnaderi
Автор

Yeah.. both strategies have encapsulated styling! So, the styles of these components are not shared with external components! It makes a lot of sense! It would be a caos!
The only difference is:
a) Emulated: It can be changed for global styles.

b) Shadow: It cannot be changed for global styles.

guibson
Автор

I mean, after 5 years of working with angular i can understand, what are you saying, but even then i almost lost it at 1:35, imagine, someone new to angular try to listen to it, and maybe they dont know english that well. Just a feedback, no offence.

Billy_Herrington__