-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.html
28 lines (26 loc) · 800 Bytes
/
vue.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
<div id="app">
{{ info }}
</div>
<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue!',
nome: '',
info: null
},
mounted () {
axios
.get('https://economia.awesomeapi.com.br/all/USD-BRL')
.then(response => (this.info = response.data.USD.name+" = "+response.data.USD.high))
}
});
</script>
</body>
</html>