Alright, here's the issue:
- I'm encountering a TypeError and I can't figure out why.
- I have Vue-resource installed and imported
Vue.use('vue-resource');
import {} from 'vue-resource';
in my main.js file.
I've tried importing it in different ways and searched for a solution without success.
The function is invoked after clicking a button
<button class="btn btn-primary" @click="submit()">Submit</button>
.
The "submit" function is as follows:
this.$http
.post("https://vue-http-20bf2.firebaseio.com/data.json", this.user)
.then(
response => {
console.log(response);
},
error => {
console.log(error);
}
);
}