Skip to content

Instantly share code, notes, and snippets.

@nOy39
Created Aug 24, 2018
Embed
What would you like to do?
<script>
export default {
name: "main",
data() {
return {
test: [],
testJSPlaceHolder: [],
errors: []
}
},
methods: {
fetchData() {
this.$axios.$get('http://localhost:8000/api/')
.then(response => {
this.test.push(response)
})
.catch(e => {
this.errors.push(e)
})
}
}
}
</script>
<script>
export default {
name: "main",
data() {
return {
test: [],
testJSPlaceHolder: [],
errors: []
}
},
methods: {
fetchData() {
this.$axios.$get('http://localhost:8000/api/')
.then(response => {
this.test.push(response)
})
.catch(e => {
this.errors.push(e)
})
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment