Go back to Examples

Index number value of loop

CMS - Intermediate

Index numbers can be accessed to get the current loop index.

                <template v-for="post in posts">
    <p>
        <span v-html="postIndex + 1"></span>
        <span v-html="post.name"></span>
    </p>
</template>