Skip to content

Commit 2bd501d

Browse files
Adam JahrAdam Jahr
authored andcommitted
L5 ending code
1 parent a6209b8 commit 2bd501d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121
<h1>{{ product }}</h1>
2222
<p v-if="inStock">In Stock</p>
2323
<p v-else>Out of Stock</p>
24+
<ul>
25+
<li v-for="detail in details">{{ detail }}</li>
26+
</ul>
27+
<ul>
28+
<li v-for="size in sizes">{{ size }}</li>
29+
</ul>
30+
<div v-for="variant in variants" :key="variant.id">{{ variant.color }}</div>
2431
</div>
2532
</div>
2633
</div>

main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ const app = Vue.createApp({
44
product: 'Socks',
55
image: './assets/images/socks_blue.jpg',
66
inStock: true,
7-
details: ['50% cotton', '30% wool', '20% polyester']
7+
details: ['50% cotton', '30% wool', '20% polyester'],
8+
sizes: ['S', 'M', 'L', 'XL'],
9+
variants: [
10+
{ id: 2234, color: 'green' },
11+
{ id: 2235, color: 'blue' },
12+
]
813
}
914
}
1015
})

0 commit comments

Comments
 (0)