@@ -37,8 +37,69 @@ <h1>Build a List with Vue.js</h1>
37
37
< ol >
38
38
< li v-for ="game in games "> {{ game.title }}</ li >
39
39
</ ol >
40
+
41
+ < h1 > Data Properties</ h1 >
42
+ < p > {{ initial }}</ p >
43
+
44
+ < h1 > Methods</ h1 >
45
+ < p > {{ startString }}</ p >
46
+ < button class ="button " @click ="addToStart "> Add to String</ button >
47
+
48
+ < h1 > Loop Through a Range</ h1 >
49
+ < span v-for ="number in 20 "> {{ number }} </ span >
50
+
51
+ < h1 > Loop Through an Array</ h1 >
52
+ < ul >
53
+ < li v-for ="item in items "> {{ item }}</ li >
54
+ </ ul >
55
+
56
+ < h1 > Looping with an Index</ h1 >
57
+ < ul >
58
+ < li v-for ="(framework, key) in frameworks "> {{ key }} - {{ framework.content }}</ li >
59
+ </ ul >
60
+
61
+ < h1 > Looping through Objects</ h1 >
62
+ < ol >
63
+ < li v-for ="music in musics "> {{ music }}</ li >
64
+ </ ol >
65
+
66
+ < h1 > Looping through Objects and Keys</ h1 >
67
+ < ol >
68
+ < li v-for ="(music, property) in musics "> < span class ="capitalize "> {{ property }}</ span > - {{ music }}</ li >
69
+ </ ol >
70
+
71
+ < h1 > Looping through Objects, Keys, and Indexes</ h1 >
72
+ < ul >
73
+ < li v-for ="(baby, property, index) in babies "> {{ index }} - < span class ="capitalize "> {{ property }}</ span > - {{ baby }}</ li >
74
+ </ ul >
75
+
76
+ < h1 > Build an Input Field</ h1 >
77
+ < label for ="fullName "> Full Name</ label >
78
+ < input id ="fullName " v-model ="fullName " class ="margin-left-15 " placeholder ="Makima San " />
79
+ < p > Your Full Name is {{ fullName }}.</ p >
80
+
81
+ < h1 > Dropdown Menus</ h1 >
82
+ < select v-model ="selected " v-bind:selected ="selected ">
83
+ < option v-for ="rate in rating " v-bind:value ="rate.value "> {{ rate.title }}</ option >
84
+ </ select >
85
+ < p > {{ selected }}</ p >
86
+
87
+ < h1 > Checkbox</ h1 >
88
+ < label for ="friends " class ="block "> < input type ="checkbox " id ="friends " value ="Friends " v-model ="recommended "> Friends</ label >
89
+ < label for ="acquaintance " class ="block "> < input type ="checkbox " id ="acquaintance " value ="Acquaintances " v-model ="recommended "> Acquaintances</ label >
90
+
91
+ < p > Recommended for {{ recommended }}</ p >
92
+
93
+ < h1 > Radio</ h1 >
94
+ < p > Would you recommend this tutorial?</ p >
95
+ < label for ="yes "> < input type ="radio " id ="yes " value ="Yes " v-model ="tutorial_review "/> Yes</ label >
96
+ < label for ="no "> < input type ="radio " id ="no " value ="No " v-model ="tutorial_review "/> No</ label >
97
+ < br /> < br />
98
+ Recommendable: {{ tutorial_review }}
99
+
40
100
</ div >
41
101
42
102
< script src ="main.js "> </ script >
103
+
43
104
</ body >
44
105
</ html >
0 commit comments