var vm = new Vue({
el: '#app',
data () {
return {
info: null
}
},
mounted () {
axios
.get('https://api.coindesk.com/v1/bpi/currentprice.json')
.then(response => (this.info = response))
}
})
console.log(vm.info)
//Why vm.info is null? I think it has already been overrided.
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<div id="app"></div>
Why vm.info is null? I think it has already been overrided.
https://v2.vuejs.org/v2/guide/
When I only use vue.js, this can be overrided.
How can I get the updated vm.info?