Closed coding-sunshine closed 7 years ago
Have you used VueJS before?
you'd simply have a variable which is an array on the data. Then use aJax or Axios to get a response back from an api endpoint or something. Then simply update the variable on data with the response and loop through them within vue-loop tags.
<vue-loop>
<div v-for="item in array" class="item">
[dynamic content] {{ item.name }} etc
</div>
</vue-loop>
or with php you could just do:
<vue-loop>
<?php foreach($array as $item) { ?>
<div class="item">
<?php echo $item->name; ?>
</div>
<?php } ?>
</vue-loop>
Hope this helps you understand it a little more. Let me know if theres any issues. 😊
thanks for the response. I am still learning vuejs so :)
no worries @coding-sunshine have you checked out http://vuecasts.com/ I recommend it.
Sorry if I am being stupid here, but I want to load dynamic data from the server on a scroll. How can I call it?