s3e41 looping objects
This commit is contained in:
parent
24a8cc7559
commit
ad14a999fa
15
index.html
15
index.html
@ -12,11 +12,24 @@
|
|||||||
({{i+1}}) {{ ingredient }}
|
({{i+1}}) {{ ingredient }}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<hr>
|
||||||
<template v-for="(ingredient, index) in ingredients">
|
<template v-for="(ingredient, index) in ingredients">
|
||||||
<h1>{{ingredient}}</h1>
|
<h1>{{ingredient}}</h1>
|
||||||
<p>{{index}}</p>
|
<p>{{index}}</p>
|
||||||
</template>
|
</template>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li v-for="person in persons">
|
||||||
|
<div v-for="(value, key, index) in person">
|
||||||
|
{{key}}: {{value}} - {{index}}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script src="app.js" charset="utf-8"></script>
|
<script src="app.js" charset="utf-8"></script>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user