Answer the question
In order to leave comments, you need to log in
How to use vue-resource in filters?
getPatientInDateTime: function (user, datetime) {
this.$http.get('http://' + window.location.hostname + '/api/day-plans/?user=' + user.id + '&start=' + datetime
).then(response => {
console.log(response.body)
}, response => {
console.log("Ошибка получения профиля пациента")
})
}
vue.js:597 [Vue warn]: Error in render: "TypeError: Cannot read property 'get' of undefined"
(found in <Root>)
Answer the question
In order to leave comments, you need to log in
You can write Vue.http instead of this.$http
getPatientInDateTime: function (user, datetime) {
Vue.http.get('http://' + window.location.hostname + '/api/day-plans/?user=' + user.id + '&start=' + datetime
).then(response => {
console.log(response.body)
}, response => {
console.log("Ошибка получения профиля пациента")
})
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question