What is ViewEncapsulation in Angular and what modes does it support?

Junior Angular

Answer

ViewEncapsulation controls how component styles are scoped.

Modes: Emulated (default), ShadowDom, and None.

It prevents CSS conflicts and supports reusable component styling.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice