visitElement method

  1. @override
void visitElement(
  1. ElementAst ast,
  2. CompileElement parent
)
override

Implementation

@override
void visitElement(ElementAst ast, CompileElement parent) {
  var nodeIndex = _view.nodes.length;
  var directives = _toCompileMetadata(ast.directives);
  var component = _componentFromDirectives(directives);

  final elementRef = _elementReference(
    ast,
    nodeIndex,
    isComponent: component != null,
  );

  if (component != null) {
    _visitComponentElement(
      parent,
      nodeIndex,
      component,
      elementRef,
      directives,
      ast,
    );
  } else {
    _visitHtmlElement(
      parent,
      nodeIndex,
      elementRef,
      directives,
      ast,
    );
  }
}