createElement method

void createElement(
  1. CompileElement parent,
  2. NodeReference elementRef,
  3. String tagName,
  4. TemplateAst ast,
)

Create an html node and appends to parent element.

Implementation

void createElement(
  CompileElement parent,
  NodeReference elementRef,
  String tagName,
  TemplateAst ast,
) {
  var parentRenderNodeExpr = _getParentRenderNode(parent);

  _createElementAndAppend(
    tagName,
    parentRenderNodeExpr,
    elementRef,
    templateUrl: component.template?.templateUrl,
    offset: (component.template?.templateOffset ?? 0) +
        ast.sourceSpan.start.offset,
  );
}