Skip to content

Instantly share code, notes, and snippets.

@velopert

velopert/app.js Secret

Last active January 27, 2017 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velopert/f18ac01217e56546989128e40a08f3b7 to your computer and use it in GitHub Desktop.
Save velopert/f18ac01217e56546989128e40a08f3b7 to your computer and use it in GitHub Desktop.
var app = new Vue({
el: '#app',
data: {
number: 0
},
// app 뷰 인스턴스를 위한 메소드들
methods: {
increment: function() {
// 인스턴스 내부의 데이터모델에 접근 할 땐,
// this 를 사용한다
this.number++;
},
decrement: function() {
this.number--;
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment