Skip to content

Commit 48d7b3a

Browse files
committed
02
1 parent 9975247 commit 48d7b3a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

index.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,24 @@
99
</head>
1010
<body>
1111
<div id="app">
12-
{{ name }}
12+
{{ nextYear('안녕') }}
1313
</div>
1414
<script>
1515
new Vue({
1616
el: '#app',
1717
data: {
18-
name: '코지 코더'
18+
person: {
19+
name: '코지 코더',
20+
age: 34
21+
}
22+
},
23+
methods: {
24+
nextYear(greeting) {
25+
return greeting + '! ' +this.person.name + ' 는 내년에 ' + (this.person.age + 1) + '살 입니다';
26+
},
27+
otherMethod: function() {
28+
this.nextYear();
29+
}
1930
}
2031
})
2132
</script>

0 commit comments

Comments
 (0)