Angular · Junior · Question 6 of 75

What does the default ViewEncapsulation.Emulated do with component styles?

Explanation

Angular rewrites selectors like h2 to h2[_ngcontent-abc] so styles do not leak out. ViewEncapsulation.ShadowDom uses native Shadow DOM, and None makes the styles global.

Further reading

Problem with a question

Angular · Junior · question 6

Test yourself

Take the Angular · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz