use of com.vaadin.flow.template.angular.ForTemplateNode in project flow by vaadin.
the class AngularTemplateParserTest method ngForElement.
@Test
public void ngForElement() {
TemplateNode node = parse("<div><a class='item' *ngFor='let item of list'>{{item.text}}</a></div>");
ForTemplateNode forNode = (ForTemplateNode) node.getChild(0);
Assert.assertEquals("list", forNode.getCollectionVariable());
Assert.assertEquals("item", forNode.getLoopVariable());
}
Aggregations