Complete Vue.js 2 Web Development_ Practical guide to building end-to-end web development solutions with Vue.js 2

(singke) #1
Navigating through the File Tree and Loading Folders from the URL Chapter 5

this.isLoading = false;
})
.catch(error => {
console.log(error);
});
},

This code loops through the entries, as we were in the view and checks the .tag attribute.


As the attribute itself begins with a ., we are unable to use the object style notation to


access the property like we would, for example, do for the name - entry.name. We then


append the entry to either the files or folders array using JavaScript push, depending


on the type.


To display this new data, we need to update the view to loop through both types of array.
This is a perfect use case for using the