-
Notifications
You must be signed in to change notification settings - Fork 0
/
index6.html
53 lines (47 loc) · 1.45 KB
/
index6.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue Trainning - Subscription Plans Exercise</title>
</head>
<body>
<div id="app">
<div v-for="plan in plans">
<plan :plan="plan"></plan>
</div>
</div>
<template id="plan-template">
<div>
<span>{{ plan.name }}</span>
<span>{{ plan.price }}/Mês </span>
<button @click="setActivePlan">Upgrade</button>
</div>
</template>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.js"></script>
<script>
new Vue({
el: "#app",
data: {
plans: [
{name: "Enterprise", price: 100},
{name: "Pro", price: 50},
{name: "Personal", price: 10},
{name: "Free", price: 0},
]
},
components: {
plan: {
template: "#plan-template",
props: ["plan"],
data: function() {
},
methods: {
setActivePlan: function() {
}
}
}
}
});
</script>
</body>
</html>