Skip to content

Instantly share code, notes, and snippets.

@mikestecker
Forked from mmikkel/vue.twig
Created September 26, 2016 21:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikestecker/629a2fb8e074cac19d8fbd527fc84984 to your computer and use it in GitHub Desktop.
Save mikestecker/629a2fb8e074cac19d8fbd527fc84984 to your computer and use it in GitHub Desktop.
Vue.js Craft template
{% includeJsFile('https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.js') %}
{% set script %}
Vue.config.debug = true;
Vue.config.delimiters = ['${', '}'];
new Vue({
el: '#content',
data: {
message: 'Hello Vue.js!'
}
});
{% endset %}
{% includeJs script %}
{% block content %}
<div id="content" role="main">
${ message }
</div>
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment