Created
August 24, 2018 07:46
-
-
Save nOy39/bb43e485b1a669fcf7b493f403a9745c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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