I have just started Vue.js and now I have a problem with using the functions inside the life cycle methods.
<script>
export default {
name: 'MapComponent',
data () {
return {
restaurants: [],
menus: []
}
},
mounted: () => {
this.augmented(2)
},
methods: {
augmented: function (variable) {
return (2 * variable)
}
}
}
</script>
My code looks like above. The problem is that when I call function augmented I get an error which is "Error in mounted hook: "TypeError: _this.augmented is not a function"
Could someone explain that why function augmented is not found?
Thank you for your help.