| Index: pkg/mdv/lib/src/template_iterator.dart
|
| diff --git a/pkg/mdv/lib/src/template_iterator.dart b/pkg/mdv/lib/src/template_iterator.dart
|
| index a54a73a2df3ac835c5e0c8d07358526aa4fa9c5f..f2cb73f91a641266b24f1a1803b3694150f5155f 100644
|
| --- a/pkg/mdv/lib/src/template_iterator.dart
|
| +++ b/pkg/mdv/lib/src/template_iterator.dart
|
| @@ -43,10 +43,21 @@ void _addBindings(Node node, model, [BindingDelegate delegate]) {
|
| }
|
|
|
| void _addAttributeBindings(Element element, model, delegate) {
|
| - element.attributes.forEach((name, value) {
|
| - if (value == '' && (name == 'bind' || name == 'repeat')) {
|
| - value = '{{}}';
|
| + var attrs = new LinkedHashMap.from(element.attributes);
|
| + if (element.isTemplate) {
|
| + // Accept 'naked' bind & repeat.
|
| + if (attrs['bind'] == '') attrs['bind'] = '{{}}';
|
| + if (attrs['repeat'] == '') attrs['repeat'] = '{{}}';
|
| +
|
| + // Treat <template if="{{expr}}"> as <template bind if="{{expr}}">
|
| + if (attrs.containsKey('if') &&
|
| + !attrs.containsKey('bind') &&
|
| + !attrs.containsKey('repeat')) {
|
| + attrs['bind'] = '{{}}';
|
| }
|
| + }
|
| +
|
| + attrs.forEach((name, value) {
|
| _parseAndBind(element, name, value, model, delegate);
|
| });
|
| }
|
|
|