How can I call method in other component on vue.js 2?
My first component like this : <template> ... </template> <script> export default { ... methods: { addPhoto() { const data = { id_product: this.idProduct} const item = this.idImage this.$store.dispatch('addImage', data) .then((response) => { this.createImage(item, response) }); }, } } </script> If the method addPhoto called, it will call ajax and then it will get response ajax I want to send response ajax and another parameter to method createImage. Method createImage is located in other component (second component) My second component like this : <template> <div> <ul class="list-inline list