This commit is contained in:
Tyrel Souza 2018-04-13 13:44:28 -04:00
parent 78e0c132e7
commit 1ac671e702
No known key found for this signature in database
GPG Key ID: 5A9394D4C30AEAC0
2 changed files with 6 additions and 11 deletions

9
app.js
View File

@ -1,14 +1,11 @@
var app = new Vue({ var app = new Vue({
el: '#app', el: '#app',
data: { data: {
title: "Hello World", counter: 0
link: "https://google.com",
finishedLink: '<a href="http://google.com/">Google</a>'
}, },
methods:{ methods:{
sayHello(){ click(){
this.title = 'Hello'; this.counter++;
return this.title;
} }
} }
}) })

View File

@ -7,10 +7,8 @@
</head> </head>
<body> <body>
<div id='app'> <div id='app'>
<h1 v-once>{{title}}</h1> <button @click="click">Click Me</button>
<p>{{ sayHello() }}</p> - <a v-bind:href="link">Google</a> <p>{{ counter }}</p>
<p v-html="finishedLink"></p>
</div> </div>
<script src="app.js" charset="utf-8"></script> <script src="app.js" charset="utf-8"></script>