Question: Explain Angular ViewEncapsulation and its types.Answer: ViewEncapsulation is an Angular feature that determines how styles are applied to components. It has three types: Emulated (default), Native, and None. Emulated encapsulation uses shadow DOM emulation, Native uses the browser's native shadow DOM, and None applies styles globally.Example:
|
Is it helpful?
Yes
No
Most helpful rated by users: