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}} from here:Well-formed XML cannot use the : and @ shortcuts for v-bind: and
v-on:. And in XML these attributes are interpreted as namespace names.To use the v-bind: and v-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">
CopyThen also add the dummy xmlns:v-bind to the <html> element of the
output – otherwise the definitions will be repeated everywhere.Solution 2:
v-bind can bind without : like below:<optionv-for="option in options"v-bind="{value: option.value}">{{option.text}}</option>Copyis equals<optionv-for="option in options"v-bind:value="option.value">{{option.text}}</option>Copycf. Vue.js#v-bindSolution 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>Copy
Share
Post a Comment
for "V-bind Error:v-bind' Is An Undeclared Prefix"
Top Question
How Can I Dynamically Add A Url Into Javascript, To Get A Second Page's Div To Display On The First Page?
Ok, so this what I have that works, for the starting code: …
How To Get Floated Divs Align To The Top?
The code below can be viewed in this fiddle: http://jsfiddl…
Firefox Doesn't Restore Server-sent Events Connection
Test case implemented with Python and CherryPy: import cher…
Remove The Button Inside The Dropdownlist
Is there a way to hide or remove the arrow button inside a …
Html Formatted Text In An Email In Java
try{ String msg='Happy BirthDay Dear, '+na…
Get Border Width From A Div With Plain Javascript
I got this style applied to a div div#content { border: 1px…
Webrequest Not Returning Html
I want to load this http://www.yellowpages.ae/categories-by…
Utilitiy Dynamic Creation Of Static Pages...(i'm Not Asking This Because I Want To, Rather Becasue I Have To...)
Does anyone know of a utility for ****ahem**** stringing to…
How Do I Set The Colour Of A Custom Tag In Html-mode
Trying to get a mode to work with silverstipe templates. Ho…
How To Write Onclick Action From Infowindow Content In Angular 4
i am working on google maps in angular 4 project i need a c…
December 2024
(1)
November 2024
(38)
October 2024
(55)
September 2024
(22)
August 2024
(372)
July 2024
(341)
June 2024
(676)
May 2024
(1294)
April 2024
(766)
March 2024
(1550)
February 2024
(1721)
January 2024
(1384)
December 2023
(1114)
November 2023
(226)
October 2023
(503)
September 2023
(289)
August 2023
(331)
July 2023
(283)
June 2023
(350)
May 2023
(227)
April 2023
(142)
March 2023
(141)
February 2023
(175)
January 2023
(275)
December 2022
(119)
November 2022
(230)
October 2022
(389)
September 2022
(159)
August 2022
(298)
July 2022
(93)
Menu Halaman Statis
Beranda
© 2022 - Stack in Html5