mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Added additional space
This commit is contained in:
parent
08e196150a
commit
31218ad113
@ -644,6 +644,7 @@ With a value of `false` for `active`, the output would be the following:
|
|||||||
Any element can be repeated for every item in an array using the `c-for` directive. The directive can be applied as an element or as an attribute.
|
Any element can be repeated for every item in an array using the `c-for` directive. The directive can be applied as an element or as an attribute.
|
||||||
|
|
||||||
_Applied as an attribute:_
|
_Applied as an attribute:_
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<ul>
|
<ul>
|
||||||
<li c-for="item in items">${item}</li>
|
<li c-for="item in items">${item}</li>
|
||||||
@ -651,6 +652,7 @@ _Applied as an attribute:_
|
|||||||
```
|
```
|
||||||
|
|
||||||
_Applied as an element:_
|
_Applied as an element:_
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<ul>
|
<ul>
|
||||||
<c-for each="item in items">
|
<c-for each="item in items">
|
||||||
@ -661,11 +663,13 @@ _Applied as an element:_
|
|||||||
|
|
||||||
|
|
||||||
Given the following value for items:
|
Given the following value for items:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
["red", "green", "blue"]
|
["red", "green", "blue"]
|
||||||
```
|
```
|
||||||
|
|
||||||
The output would be the following:
|
The output would be the following:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<ul>
|
<ul>
|
||||||
<li>red</li>
|
<li>red</li>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user