Skip to content

Instantly share code, notes, and snippets.

@Askar-Rymbayev
Forked from freearhey/collection.xml
Created August 31, 2016 07:34
Show Gist options
  • Select an option

  • Save Askar-Rymbayev/02f505820692ccc35cadc34f33332b53 to your computer and use it in GitHub Desktop.

Select an option

Save Askar-Rymbayev/02f505820692ccc35cadc34f33332b53 to your computer and use it in GitHub Desktop.
Использование vue.js в XSLT шаблоне
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="template.xsl" type="text/xsl" ?>
<collection />
Vue.component('hello', {
template: '#hello-template',
data: function() {
return {
greeting: 'Hola!'
}
}
})
new Vue({
el: 'body'
})
<?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