1👍
Thanks to all the people who tried to answer, I figured it out myself in the end. I had to convert the integer to a string before it would be accepted as a viable class name. See below:
featuresLength() {
return this.products[0].features.length.toString()
}
Then combine that with the answers above:
<Halo :featuresCount="featuresLength()"> .. etc
and it worked!
0👍
I think you forgot to bind :featuresCount like this
<Halo :featuresCount="featuresLength">...</Halo>
- [Vuejs]-Vue calling function in rendered template for modal
- [Vuejs]-How to manage re-rendering a navigation on a SPA in vue js
Source:stackexchange.com