Skip to content

Instantly share code, notes, and snippets.

@UnaiYecora
Last active November 13, 2019 11:41
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Vue.js: Show object/array as comma-separated list on a v-for
<!-- This is how you get a comma-separated list of items in Vue.js 2.0,
without a comma at the end of the last item -->
<p v-for="(item, index) in items">
{{author}}<span v-if="index != (items.length - 1)">,</span>
</p>
@0dp
Copy link

0dp commented Nov 13, 2019

Nice! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment