1👍
If you don’t wanna use html tag, you can use template
.
Example:
<template v-for="post in posts">
<h1>{{ post.title }}</h1>
<p>{{ post.author }}</p>
</template>
0👍
The way you did it is fine. Though, it is better to use list elements for this because they are more semantically correct. Then, add a :key attribute to the list items. See link for the sample: https://v2.vuejs.org/v2/guide/list.html. The page will still work if the :key attribute is included but it helps to properly re-render the list.
- [Vuejs]-Trouble making http request to backend with stripe
- [Vuejs]-How to set a timeout so that an await takes at least a certain amount of time?
-1👍
you can add it in the <div>
<div v-for="post in posts">
<h1>{{ post.title }}</h1>
<p>{{ post.author }}</p>
</div>
- [Vuejs]-How can i access to 'download_url' in json using vuejs
- [Vuejs]-Images with dropzone in vue with laravel mix
Source:stackexchange.com