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}}
<select class="form-control" id="myExample1">
<option v-for="option in options">{{option.text}}</option>
</select>
But when I insert v-bind attribute, the page is broken:
<select class="form-control" id="myExample1">
<option v-for="option in options" v-bind:value="option.value">{{option.text}}</option>
</select>
Rendering page fail and show "Error: 'v-bind' is an undeclared prefix."
Maybe it's too late, but for those who searching, I found good solution from here:
Well-formed XML cannot use the
:
and@
shortcuts forv-bind:
andv-on:
. And in XML these attributes are interpreted as namespace names.To use the
v-bind:
andv-on:
syntax in XML (e.g. XSLT files), add these as dummy namespaces in the XML, e.g.<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:v-bind="https://vuejs.org/v2/api/#v-bind" xmlns:v-on="https://vuejs.org/v2/api/#v-on">
Then also add the dummy
xmlns:v-bind
to the<html>
element of the output – otherwise the definitions will be repeated everywhere.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With