compileComponent method

ViewCompileResult compileComponent(
  1. View view,
  2. Expression styles, {
  3. required bool registerComponentFactory,
})

Implementation

ViewCompileResult compileComponent(
  ir.View view,
  o.Expression styles, {
  required bool registerComponentFactory,
}) {
  var statements = <o.Statement>[];
  var compileView = CompileView(
    view.cmpMetadata!,
    _genConfig,
    view.directiveTypes,
    view.pipes,
    styles,
    0,
    CompileElement.root(),
    [],
    _genConfig.enableDataDebugSource,
  );
  view.compileView = compileView;
  _buildView(view);
  // Need to separate binding from creation to be able to refer to
  // variables that have been declared after usage.
  bindView(view, _schemaRegistry, bindHostProperties: true);
  _finishView(compileView, statements,
      registerComponentFactory: registerComponentFactory);
  return ViewCompileResult(statements);
}