Skip to content

Commit 049c0e6

Browse files
author
Shaun Pelling
committed
added lesson 3 code
1 parent 0ee6efe commit 049c0e6

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

app.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
new Vue({
22
el: '#vue-app',
33
data: {
4-
name: 'Shaun'
4+
name: 'Shaun',
5+
job: 'Ninja'
6+
},
7+
methods: {
8+
greet: function(time){
9+
return 'Good ' + time + ', ' + this.name;
10+
}
511
}
612
});

index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
</head>
99
<body>
1010
<div id="vue-app">
11-
<h1>Hey, {{ name }}</h1>
11+
<h1>{{ greet('afternoon') }}</h1>
12+
<p>Name: {{ name}}</p>
13+
<p>Job: {{ job }}</p>
1214
</div>
1315
</body>
1416

0 commit comments

Comments
 (0)