[Vuejs]-Vue js how call method defined in same component from another method

-1👍

The problem shouldn’t occur if you’re calling showMessage from the component where it is defined. However, if you’re calling it from some other component you first need some way to have that method in that component. The best way to share the same code between components while avoiding duplication is to create a mixin.

You can read about it here (https://v2.vuejs.org/v2/guide/mixins.html)

Leave a comment