-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path01helloWorld.js
More file actions
28 lines (27 loc) · 884 Bytes
/
Copy path01helloWorld.js
File metadata and controls
28 lines (27 loc) · 884 Bytes
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
// wait until the DOM specified in <body> has loaded before executing the
// function, if you have ever used jQuery $(document).ready() it is
// basically the same thing.
// If you don't link in the html footer you must wait that it is ready
// document.addEventListener('DOMContentLoaded', function () {
// create a new Vue.js instance and specify the template as well as the
// data that should be displayed in it.
new Vue({
el: '#app',
data: {
inputWord:'Input',
title: 'Hello World!',
link: 'http://google.com',
finishedLink: '<a href="http://google.com">Google</a>'
},
methods: {
changeTitle: function(event){
this.title = event.target.value;
this.inputWord = event.target.value;
},
sayHello: function(){
this.title = 'Hello';
return this.title + ' Sara';
}
}
});
// });