Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created January 24, 2018 19:16
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 matthieu-D/82afe1d9526d0535d94af29d85bb2b76 to your computer and use it in GitHub Desktop.
Save matthieu-D/82afe1d9526d0535d94af29d85bb2b76 to your computer and use it in GitHub Desktop.
import Vue from "vue";
export default Vue.extend({
data () {
return {
msg: 'Welcome to Your Vue.js App'
}
},
methods: {
// Careful of () =>
showFirstThis: function() {
console.log('Basic function', this);
},
showSecondThis: () => {
console.log('Fat arrow', this);
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment