Created
August 31, 2016 05:45
-
-
Save freearhey/840a2445d96a9b10c375492c9cc56edb to your computer and use it in GitHub Desktop.
Использование vue.js в XSLT шаблоне
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<?xml-stylesheet href="template.xsl" type="text/xsl" ?> | |
<collection /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('hello', { | |
template: '#hello-template', | |
data: function() { | |
return { | |
greeting: 'Hola!' | |
} | |
} | |
}) | |
new Vue({ | |
el: 'body' | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="/"> | |
<html> | |
<body> | |
<hello></hello> | |
<template id="hello-template"> | |
<h1>{{ greeting }}</h1> | |
</template> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.min.js"></script> | |
<script src="main.js"></script> | |
</body> | |
</html> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment