-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
39 lines (39 loc) · 1.25 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vue.js introduction project</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<link
href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap"
rel="stylesheet"
/>
</head>
<body>
<!-- app div is linked to the instance -->
<div id="app">
<div class="basketContainer">
<p class="basket">Basket ({{ basket.length }})</p>
</div>
<header>
<h1>Air Shop</h1>
</header>
<!-- each item is a component -->
<!-- bind the custom basket/premiumUser attribute to data, pass in "basket" and "premiumUser" as the expression -->
<!-- the expression evaluates to the data in app (the parent) -->
<item
:basket="basket"
:premiumuser="premiumuser"
@add-to-basket="addToBasket"
@remove-from-basket="removeFromBasket"
></item>
<footer>
<p>Made with Vue.js</p>
</footer>
</div>
<!-- install vue with this script tag -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="main.js"></script>
</body>
</html>