File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed 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</ title >
7
+ < link rel ="stylesheet " href ="">
8
+ </ head >
9
+ < body >
10
+ < div id ="app ">
11
+ <!--
12
+ Podemos substituir a diretiva "v-on:" por "@". Ambas as formas são
13
+ interpretadas da mesma forma pelo VueJS. O "@" é apenas um atalho para
14
+ o "v-on:".
15
+ -->
16
+ < button @click ="changeLink "> Click to change link</ button >
17
+
18
+ <!--
19
+ Podemos substituir a diretiva "v-bind" por ":". Ambas as formas são
20
+ interpretadas da mesma forma pelo VueJS. O ":" é apenas um atalho para
21
+ o "v-bind".
22
+ -->
23
+ < a :href ="link "> Link</ a >
24
+ </ div >
25
+
26
+ < script src ="../js/vue.js "> </ script >
27
+ < script src ="../js/exemplo7.js "> </ script >
28
+ </ body >
29
+ </ html >
Original file line number Diff line number Diff line change
1
+ new Vue ( {
2
+ el : '#app' ,
3
+ data :{
4
+ link : 'http://google.com'
5
+ } ,
6
+ methods : {
7
+ changeLink : function ( ) {
8
+ this . link = 'http://apple.com'
9
+ }
10
+ }
11
+ } ) ;
You can’t perform that action at this time.
0 commit comments