| Index: lib/src/info.dart
|
| diff --git a/lib/src/info.dart b/lib/src/info.dart
|
| index c01bbcfe2de52d5e4b98f1c1807a2d5eeb78575e..792df8e3fb1c768cdf2119c98c2039304610d5e8 100644
|
| --- a/lib/src/info.dart
|
| +++ b/lib/src/info.dart
|
| @@ -374,10 +374,10 @@ class ElementInfo extends NodeInfo<Element> {
|
| final Set<String> removeAttributes = new Set<String>();
|
|
|
| /** Whether the template element has `iterate="... in ...". */
|
| - bool get hasIterate => false;
|
| + bool get hasLoop => false;
|
|
|
| /** Whether the template element has an `if="..."` conditional. */
|
| - bool get hasIfCondition => false;
|
| + bool get hasCondition => false;
|
|
|
| bool get isTemplateElement => false;
|
|
|
| @@ -397,8 +397,8 @@ class ElementInfo extends NodeInfo<Element> {
|
| 'childrenCreatedInCode: $childrenCreatedInCode, '
|
| 'component: $component, '
|
| 'descendantHasBinding: $descendantHasBinding, '
|
| - 'hasIterate: $hasIterate, '
|
| - 'hasIfCondition: $hasIfCondition, '
|
| + 'hasLoop: $hasLoop, '
|
| + 'hasCondition: $hasCondition, '
|
| 'attributes: $attributes, '
|
| 'events: $events>';
|
| }
|
| @@ -546,10 +546,20 @@ class TemplateInfo extends ElementInfo {
|
| */
|
| final String loopItems;
|
|
|
| + /**
|
| + * If [hasLoop] is true, this indicates if the attribute was "repeat" instead
|
| + * of "iterate".
|
| + *
|
| + * For template elements, the two are equivalent, but for template attributes
|
| + * repeat causes that node to repeat in place, instead of iterating its
|
| + * children.
|
| + */
|
| + final bool isRepeat;
|
| +
|
| TemplateInfo(Node node, ElementInfo parent,
|
| - {this.ifCondition, this.loopVariable, this.loopItems})
|
| + {this.ifCondition, this.loopVariable, this.loopItems, this.isRepeat})
|
| : super(node, parent) {
|
| - childrenCreatedInCode = hasIfCondition || hasIterate;
|
| + childrenCreatedInCode = hasCondition || hasLoop;
|
| }
|
|
|
| /**
|
| @@ -558,9 +568,9 @@ class TemplateInfo extends ElementInfo {
|
| */
|
| bool get isTemplateElement => node.tagName == 'template';
|
|
|
| - bool get hasIfCondition => ifCondition != null;
|
| + bool get hasCondition => ifCondition != null;
|
|
|
| - bool get hasIterate => loopVariable != null;
|
| + bool get hasLoop => loopVariable != null;
|
|
|
| String toString() => '#<TemplateInfo ${super.toString()}'
|
| 'ifCondition: $ifCondition, '
|
|
|