Created
August 28, 2018 16:02
-
-
Save Strift/430abe755a2e77222599c29a39cf3bc4 to your computer and use it in GitHub Desktop.
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
var app = new Vue({ | |
el: '#app', | |
data: { | |
requests: [], | |
listOfNames: [] | |
}, | |
created: function (argument) { | |
this.fetchRequests() | |
}, | |
methods: { | |
fetchRequests () { | |
fetch('url').then(function(data) { | |
this.requests = data | |
}).then(function() { | |
fetch('other url').then(function(data) { | |
this.listOfNames = data | |
}) | |
}) | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment