parse function
List<TemplateAst>
parse(
- String template, {
- required String sourceUrl,
- bool desugar = true,
- ExceptionHandler exceptionHandler = const ThrowingExceptionHandler(),
Returns template
parsed as an abstract syntax tree.
If desugar
is set, parsing will transform *directive
and [(banana)]
notations into their explicit forms using <template>
and [value]="..." (valueChanged)="..."
respectively.
Implementation
List<TemplateAst> parse(
String template, {
required String sourceUrl,
bool desugar = true,
ExceptionHandler exceptionHandler = const ThrowingExceptionHandler(),
}) {
return const NgParser().parse(
template,
sourceUrl: sourceUrl,
exceptionHandler: exceptionHandler,
desugar: desugar,
);
}