Skip to content

Instantly share code, notes, and snippets.

@flowck
Created March 26, 2019 21:06
Show Gist options
  • Save flowck/4437f1e39e4cd93c9bba3305b36461ec to your computer and use it in GitHub Desktop.
Save flowck/4437f1e39e4cd93c9bba3305b36461ec to your computer and use it in GitHub Desktop.
// App.vue
export default {
name: "App.vue",
data() {
return {
value: 5000
};
},
methods: {
/*
* Inside a regular method
*/
logValueInUSD() {
console.log(this.$options.filters.numberToUSD(this.value));
}
},
/**
* Inside lifecycle method: created()
*/
created() {
console.log(this.$options.filters.numberToUSD(this.value));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment