0 votes
in VueJS by
recategorized by

How do you use v-for directive with a range?

1 Answer

0 votes
by

You can also use integer type(say 'n') for v-for directive which repeats the element many times.

<div>
  <span v-for="n in 20">{{ n }} </span>
</div>

It displays the number 1 to 20.

Related questions

0 votes
asked Oct 21, 2019 in VueJS by Tate
0 votes
asked Oct 21, 2019 in VueJS by Tate
...