Skip to content

Instantly share code, notes, and snippets.

@nOy39
Created August 24, 2018 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nOy39/bb43e485b1a669fcf7b493f403a9745c to your computer and use it in GitHub Desktop.
Save nOy39/bb43e485b1a669fcf7b493f403a9745c to your computer and use it in GitHub Desktop.
<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