Хорошо, итак:
- Я получаю TypeError, и я не знаю, почему,
- Vue-resource установлен и импортирован
Vue.use('vue-resource');
import {} from 'vue-resource';
в мой main.js.
Я пытался импортировать его по-другому, я искал решение, но безуспешно.
Я вызываю эту функцию после нажатия кнопки <button class="btn btn-primary" @click="submit()">Submit</button>
.
Функция «отправить» выглядит так:
this.$http
.post("https://vue-http-20bf2.firebaseio.com/data.json", this.user)
.then(
response => {
console.log(response);
},
error => {
console.log(error);
}
);
}```
Vue.http
вместоthis.$http
- person G.aziz   schedule 06.05.2019vue.js?3de6:1897 ReferenceError: Vue is not defined at VueComponent.submit (eval at <anonymous> (build.js:1003),
- person Aleksander Jess   schedule 06.05.2019