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 }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<template v-for="(ingredient, index) in ingredients">
|
||||
<h1>{{ingredient}}</h1>
|
||||
<p>{{index}}</p>
|
||||
</template>
|
||||
<hr>
|
||||
|
||||
<ul>
|
||||
|
||||
<li v-for="person in persons">
|
||||
<div v-for="(value, key, index) in person">
|
||||
{{key}}: {{value}} - {{index}}
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<script src="app.js" charset="utf-8"></script>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user