[Vuejs]-How to get response from other file request response in Laravue

0👍

This is now solved, added a

return

before

Vue.http.post(

in File2.vue

File1.vue

   File2.updateNotice(this,{'id':id}).then((response) => {
      console.log("response from File2  :",response)
   }); 

File2.vue

updateNotice(context,params) {
            let url = staff_service.STAFF_NOTICES_READ_RESOURCE;
            return Vue.http.post(
                url,
                params
            ).then(response => {
                return response;
            }) 
}

Leave a comment