File tree Expand file tree Collapse file tree 3 files changed +47
-1
lines changed Expand file tree Collapse file tree 3 files changed +47
-1
lines changed Original file line number Diff line number Diff line change 5
5
< meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
6
6
< title > VueJS</ title >
7
7
< link rel ="stylesheet " href ="">
8
- < script src ="vue.js "> </ script >
9
8
</ head >
10
9
< body >
11
10
< div id ="app ">
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html >
3
+ < head >
4
+ < meta charset ="utf-8 ">
5
+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
6
+ < title > VueJS - Exercises</ title >
7
+ < link rel ="stylesheet " href ="">
8
+ </ head >
9
+ < body >
10
+
11
+ < div id ="app ">
12
+ <!-- 1) Fill the <p> below with your Name and Age - using Interpolation -->
13
+ < p > VueJS is pretty cool - {{ YOUR_NAME }} ({{ YOUR_AGE }})</ p >
14
+
15
+ <!-- 2) Output your age, multiplied by 3 -->
16
+ < p > {{ YOUR_AGE * 3 }}</ p >
17
+
18
+ <!-- 3) Call a function to output a random float between 0 and 1 (Math.random()) -->
19
+ < p > {{ randomNumber() }}</ p >
20
+
21
+ <!-- 4) Search any image on Google and output it here by binding the "src" attribute -->
22
+ < div >
23
+ < img style ="width:100px;height:100px " v-bind:src ="IMAGE ">
24
+ </ div >
25
+
26
+ <!-- 5) Pre-Populate this input with your name (set the "value" attribute) -->
27
+ < div >
28
+ < input type ="text " v-bind:value ="YOUR_NAME ">
29
+ </ div >
30
+ </ div >
31
+ < script src ="https://unpkg.com/vue/dist/vue.js "> </ script >
32
+ < script src ="../js/exercises.js "> </ script >
33
+ </ body >
34
+ </ html >
Original file line number Diff line number Diff line change
1
+ new Vue ( {
2
+ el : '#app' ,
3
+ data :{
4
+ YOUR_NAME : 'Luiz Eduardo Martins' ,
5
+ YOUR_AGE : '24' ,
6
+ IMAGE : 'https://thumbor.forbes.com/thumbor/100x0/smart/https%3A%2F%2Fblogs-images.forbes.com%2Fstartswithabang%2Ffiles%2F2017%2F12%2Fflying-galaxy-in-cluster.jpg'
7
+ } ,
8
+ methods : {
9
+ randomNumber : function ( ) {
10
+ return Math . random ( ) ;
11
+ }
12
+ }
13
+ } ) ;
You can’t perform that action at this time.
0 commit comments