[Vuejs]-Looping over parent data (set via Ajax) in child components

0👍

You can set a watcher on the people array and call the displayName function on the watcher. Whenever the data in the people array changes the watcher is run, so it will be run when the ajax request returns the data from the API. Another option would be to run the loop immediately on the callback.

Leave a comment