• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in Vue.JS by
Q:

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 Vue.JS by Tate
0 votes
asked Oct 21, 2019 in Vue.JS by Tate
...