compileComponent method

StylesCompileResult compileComponent(
  1. Component component
)

Compile styles to a set of statements that will initialize the global styles_ComponentName variable that will be passed to component factory.

comp.template.styles contains a list of inline styles (or overrides in tests) and comp.template.styleUrls contains urls to other css.shim.dart resources.

Implementation

StylesCompileResult compileComponent(ir.Component component) {
  var requiresShim = component.encapsulation == ir.ViewEncapsulation.emulated;
  return _compileStyles(_getStylesVarName(component.name), component.styles,
      component.styleUrls, requiresShim);
}