<script>
export default {
data: function() {
return {
infos: null,
links: {},
meta: {},
url: '/api/info'
}
},
methods: {
getInfos() {
axios.get('/api/info')
.then((response) => {this.infos = response});
console.log(this.infos);
}
},
mounted: function() {
this.getInfos();
}
}
</script>
Na końcu this.infos nadal wyświetla się jako null mimo, że usiłuję przypisać mu response. Co ciekawe jeśli wypisze response to dostanę eleganckiego JSON-a.
Gdzie może leżeć przyczyna?