api methods in vuejs code example
Example 1: vue nextTick
this.$nextTick(() => {});
Example 2: import api vue and html
new Vue({
el: '#app',
data () {
return {
info: null
}
},
mounted () {
axios
.get('https://api.coindesk.com/v1/bpi/currentprice.json')
.then(response => (this.info = response))
}
})