learnin-some-vue/lessons/index.html
2018-04-14 00:48:04 -04:00

42 lines
906 B
HTML

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<script src="../vue.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id='app'>
<ul>
<li v-for="(ingredient, i) in ingredients" :key="ingredient">
({{i+1}}) {{ ingredient }}
</li>
</ul>
<button @click="ingredients.push('spices')"> Add New</button>
<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>
<hr>
<span v-for="n in 10">{{n}} </span>
</div>
<script src="app.js" charset="utf-8"></script>
</body>
</html>