vue에서 $의 의미 - devhaeyeon/vueExample GitHub Wiki
https://kr.vuejs.org/v2/cookbook/adding-instance-properties.html
=> $ is a convention Vue uses for properties that are available to all instances. $는 Vue가 모든 인스턴스로 사용할 수 있는 속성에 사용하는 컨벤션이다.
new Vue({
data: {
// Uh oh - appName is *also* the name of the
// instance property we defined!
appName: 'The name of some other app'
},
beforeCreate: function () {
console.log(this.appName)
},
created: function () {
console.log(this.appName)
}
})
It would be "The name of some other app", then "My App", because this.appName is overwritten (sort of) by data when the instance is created. $ to avoid this.
인스턴스가 만들어질 때 data에 의해 오버라이딩됨. $는 이를 막아준다.