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
  • 3,861
  • 9
  • 43
  • 74
  • 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://vuejs.org/v2/guide/syntax.html#Attributes

Muthu Kumaran
  • 17,301
  • 5
  • 46
  • 70