Created
April 17, 2020 07:28
-
-
Save blogcacanid/9afbaed88adec2e35df85c09dd96244c to your computer and use it in GitHub Desktop.
indonesia.js Covid-19 Vue.js - Indonesia
This file contains hidden or 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
const url = "https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH&tsyms=USD,EUR"; | |
const url_summaries = "https://api.kawalcorona.com/indonesia/"; | |
const url_details = "https://api.kawalcorona.com/indonesia/provinsi/"; | |
const vm = new Vue({ | |
el: '#app', | |
data: { | |
results: [], | |
summaries: [], | |
details: [] | |
}, | |
mounted() { | |
axios.get(url).then(response => { | |
this.results = response.data | |
}), | |
axios.get(url_summaries).then(response => { | |
this.summaries = response.data | |
}), | |
axios.get(url_details).then(response => { | |
this.details = response.data | |
}) | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment