donpuerto
244
2
Vue

How to make your vue-resource reactive after call?

Posted 2 years ago by donpuerto
  • Im having trouble on what way to get my data reactive.
  • Im trying to delete a record. Yes its working, but the problem how i am going to refresh the table using vue js reactivity.
  • On documentation says by using Vue.set() or Vue.nextTick(), but i dont know how to use it on my case?
onDeleteContact(id){
               var vm = this;
                this.$http({url: '/api/contacts/'+id, method: 'delete'})
                        .then(function (response) {
                            if(response.status === 200){
                                   //this.$set(vm,this.$parent.contacts,response.body.updatedContacts);
                             }

                 })
},

Please sign in or create an account to participate in this conversation.