Skip to content

Commit 8dd2042

Browse files
Adam JahrAdam Jahr
authored andcommitted
L2 Starting code
1 parent 1423465 commit 8dd2042

File tree

2 files changed

+3
-33
lines changed

2 files changed

+3
-33
lines changed

index.html

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,10 @@
1010
</head>
1111
<body>
1212
<div id="app">
13-
<div class="nav-bar"></div>
14-
15-
<div class="cart">
16-
<p>Cart({{ cart.length }})</p>
17-
</div>
18-
<product-display
19-
:premium="premium"
20-
@add-to-cart="updateCart"
21-
></product-display>
13+
<h1>Product goes here</h1>
2214
</div>
2315

24-
<!-- Import App -->
16+
<!-- Import JS -->
2517
<script src="./main.js"></script>
26-
27-
<!-- Import Components -->
28-
<script src="./components/ProductDisplay.js"></script>
29-
<script src="./components/ReviewForm.js"></script>
30-
<script src="./components/ReviewList.js"></script>
31-
32-
<!-- Mount App -->
33-
<script>
34-
app.mount('#app')
35-
</script>
3618
</body>
3719
</html>

main.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
1-
const app = Vue.createApp({
2-
data() {
3-
return {
4-
premium: true,
5-
cart: []
6-
}
7-
},
8-
methods: {
9-
updateCart(id) {
10-
this.cart.push(id)
11-
}
12-
}
13-
})
1+
const product = "Socks"

0 commit comments

Comments
 (0)