@webqit/oohtml 2.1.68 → 2.1.70
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
|
@@ -649,22 +649,22 @@ Here, we get the `binding` attribute for a declarative and neat, key/value data-
|
|
|
649
649
|
| `@html` | Markup content | `<span binding="@html: '<i>' + firstName + '</i>';"></span>` |
|
|
650
650
|
| `@items` | A list, with argument in the following format:<br>`<declaration> <of\|in> <iterable> / <importRef>` | *See next two tables* |
|
|
651
651
|
|
|
652
|
-
<details><summary>
|
|
652
|
+
<details><summary>About <code>For ... Of</code> Loops</summary>
|
|
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>` |
|
|
660
660
|
|
|
661
661
|
</details>
|
|
662
662
|
|
|
663
|
-
<details><summary>
|
|
663
|
+
<details><summary>About <code>For ... In</code> Loops</summary>
|
|
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>
|