Last active
November 18, 2018 14:51
-
-
Save thisiswei/eb73c42e7a97fb2b9093a3cee32c13dd to your computer and use it in GitHub Desktop.
learning vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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