7

Following keeps throwing an error:

<th style="padding-right: 0px;" v-for="n in modelClustersList"  colspan="{{modelClustersList.length}}">

Its kind of wierd I can use the {{modelClustersList.length}} other places. Is colspan somehow special in Vue?

Thomas Segato
  • 4,567
  • 11
  • 55
  • 104
  • Possible duplicate of [How to solve Interpolation inside attributes has been removed. Use v-bind or the colon shorthand ? Vue.JS 2](https://stackoverflow.com/questions/43211760/how-to-solve-interpolation-inside-attributes-has-been-removed-use-v-bind-or-the) – Bert Oct 07 '17 at 15:39
  • Looks like it. Will test asap. Thanks! – Thomas Segato Oct 07 '17 at 15:40

1 Answers1

11

use v-bind directive to manuplate html attribute,

v-bind:colspan="modelClustersList.length"

shorthand:

:colspan="modelClustersList.length"

Refer Vue docs: https://v2.vuejs.org/v2/guide/syntax.html#Attributes

tony19
  • 125,647
  • 18
  • 229
  • 307
Muthu Kumaran
  • 17,682
  • 5
  • 47
  • 70