30 seconds of angular
Star
✨✨ New to Angular? Check out interactive Angular Codelab ✨✨

Default ViewEncapsulation value

If you're using ViewEncapsulation value which is different than default, it might be daunting to set the value manually for every component.

Luckily you can configure it globally when bootstrapping your app:

platformBrowserDynamic().bootstrapModule(AppModule, [
  {
    // NOTE: Use ViewEncapsulation.None only if you know what you're doing.
    defaultEncapsulation: ViewEncapsulation.None
  }
]);

Interactive demo