V-bind Error:v-bind' Is An Undeclared Prefix
I'm working in asp.net with Orckestra CMS (before Composite) and Razor Templates and trying to use Vue framework. All is fine when using {{option.text}}
Solution 2:
v-bind
can bind without :
like below:
<optionv-for="option in options"v-bind="{value: option.value}">{{option.text}}</option>
is equals
<optionv-for="option in options"v-bind:value="option.value">{{option.text}}</option>
cf. Vue.js#v-bind
Solution 3:
It's not a problem about vuejs as this fiddle shows. The Razor Template engine does not know the namespace v-bind:
and only :
is invalid xml.
You need to tell the template engine about the namespaces of vuejs. Here is another stack overflow article about adding custom namespaces to Razor template engine.
Solution 4:
SOLVED: The problem is the XHTML validation, is very strict with tags, attributes, etc.
The way to sort this validation is inset the code between < ![CDATA[ "blablabla" ]]>
<selectclass="form-control"id="myExample1">
<![CDATA[
<option v-for="option in options" v-bind:value="option.value">{{option.text}}</option>
]]>
</select>
Post a Comment for "V-bind Error:v-bind' Is An Undeclared Prefix"