Skip to content

Instantly share code, notes, and snippets.

@thisiswei
Last active November 18, 2018 14:51
Show Gist options
  • Save thisiswei/eb73c42e7a97fb2b9093a3cee32c13dd to your computer and use it in GitHub Desktop.
Save thisiswei/eb73c42e7a97fb2b9093a3cee32c13dd to your computer and use it in GitHub Desktop.
learning vue
// different hooks:
// - created
// - mounted
// - updated
// - destoryed
new Vue({
data: {
a: 1
},
created: function () {
// `this` points to the vm instance
console.log('a is: ' + this.a)
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment