mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Marko v3: Moved over pending native for loop test
This commit is contained in:
parent
566edc6908
commit
acb4d30886
@ -1,6 +0,0 @@
|
||||
<for each="item in ['a', 'b', 'c']" for-loop="true">
|
||||
${item}
|
||||
</for>
|
||||
<div for="item in ['red', 'green', 'blue']; for-loop=true" >
|
||||
${item}
|
||||
</div>
|
||||
18
test/fixtures/render/autotest/for-native/template.marko
vendored
Normal file
18
test/fixtures/render/autotest/for-native/template.marko
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
<script marko-init>
|
||||
var array1 = ['a', 'b', 'c'];
|
||||
var array2 = ['red', 'green', 'blue'];
|
||||
</script>
|
||||
|
||||
<var i item>
|
||||
<for(i=0; i<array1.length; i++)>
|
||||
<assign item=array1[i]/>
|
||||
${item}
|
||||
</for>
|
||||
</var>
|
||||
|
||||
<var i item>
|
||||
<div for(i=0; i<array2.length; i++)>
|
||||
<assign item=array2[i]/>
|
||||
${item}
|
||||
</div>
|
||||
</var>
|
||||
Loading…
x
Reference in New Issue
Block a user