angular_ast 0.1.0-dev copy "angular_ast: ^0.1.0-dev" to clipboard
angular_ast: ^0.1.0-dev copied to clipboard

discontinuedreplaced by: ngast
outdatedDart 1 only

Parser and utilities for AngularDart templates

angular_ast #

Parser and utilities for AngularDart templates.

This package is platform agnostic (no HTML or Dart VM dependencies).

Usage #

Currently in development and not stable.

import 'package:angular_ast/angular_ast.dart';

main() {
  // Create an AST tree by parsing an AngularDart template.
  var tree = parse('<button [title]="someTitle">Hello</button>');

  // Print to console.
  print(tree);

  // Output:
  // [
  //    ElementAst <button> { 
  //      properties=
  //        PropertyAst {
  //          title="ExpressionAst {someTitle}"} 
  //          childNodes=TextAst {Hello} 
  //      }
  //    }
  // ]
}