@webqit/oohtml 2.1.69 → 2.1.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -653,7 +653,7 @@ Here, we get the `binding` attribute for a declarative and neat, key/value data-
|
|
|
653
653
|
|
|
654
654
|
| Idea | Usage |
|
|
655
655
|
| :---- | :---- |
|
|
656
|
-
|
|
|
656
|
+
| A `for...of` loop over an array/iterable | `<ul binding="@items: value of [1,2,3] / 'foo#fragment';"></ul>` |
|
|
657
657
|
| Same as above but with a `key` declaration | `<ul binding="@items: (value, key) of [1,2,3] / 'foo#fragment';"></ul>` |
|
|
658
658
|
| Same as above but with different variable names | `<ul binding="@items: (product, id) of store.products / 'foo#fragment';"></ul>` |
|
|
659
659
|
| Same as above but with a dynamic `importRef` | `<ul binding="@items: (product, id) of store.products / store.importRef;"></ul>` |
|
|
@@ -664,7 +664,7 @@ Here, we get the `binding` attribute for a declarative and neat, key/value data-
|
|
|
664
664
|
|
|
665
665
|
| Idea | Usage |
|
|
666
666
|
| :---- | :---- |
|
|
667
|
-
|
|
|
667
|
+
| A `for...in` loop over an object | `<ul binding="@items: key in { a: 1, b: 2 } / 'foo#fragment';"></ul>` |
|
|
668
668
|
| Same as above but with a `value` and `index` declaration | `<ul binding="@items: (key, value, index) in { a: 1, b: 2 } / 'foo#fragment';"></ul>` |
|
|
669
669
|
|
|
670
670
|
</details>
|
|
@@ -688,11 +688,11 @@ Generated item elements are automatically assigned a corresponding index with a
|
|
|
688
688
|
|
|
689
689
|
<!-- The "items" template -->
|
|
690
690
|
<template def="item" scoped>
|
|
691
|
-
<li binding="@text:
|
|
691
|
+
<li binding="@text: index + ': ' + name;"></li>
|
|
692
692
|
</template>
|
|
693
693
|
|
|
694
694
|
<!-- The loop -->
|
|
695
|
-
<ul binding="@items: (name,
|
|
695
|
+
<ul binding="@items: (name, index) of ['dog','cat','ram'] / 'item';"></ul>
|
|
696
696
|
|
|
697
697
|
</section>
|
|
698
698
|
```
|