Hao
Hao

Reputation: 45

use v-for to render children components

can I use v-for to render children components in the parent element?

<todo-list>
 <todo-item v-for="(item, index) in items" :title="item.title" :index="index"></todo-item>
</todo-list>

Upvotes: 3

Views: 83

Answers (1)

klimat
klimat

Reputation: 24991

Yes, you can.

It's clearly explained in the documentation.

Upvotes: 1

Related Questions