loads a list of files from a file or a server
url | string | the path to the data |
format | string|object | optional, the data format ("json" by default; other values are "csv" or an object) |
promise | a promise of data loading |
vault.data.load("/files.json");
The component will make an AJAX call and expect the remote URL to provide valid JSON data.
Data loading is asynchronous, so you need to wrap any after-loading code into a promise:
vault.data.load("../some/data").then(function(){
// some after-loading code
});