Angular · Junior · Question 6 of 75
What does the default ViewEncapsulation.Emulated do with component styles?
- ✓Correct answer: Scopes them to the component by adding generated attributes to its elements and selectors
- 2Applies them globally to the whole page
- 3Puts the component in a real Shadow DOM
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.