Skip to content

Instantly share code, notes, and snippets.

@shyiko
Last active April 21, 2017 09:30
Show Gist options
  • Save shyiko/9ef8b689dd731dff9e3a03c2ba29705b to your computer and use it in GitHub Desktop.
Save shyiko/9ef8b689dd731dff9e3a03c2ba29705b to your computer and use it in GitHub Desktop.
jsbin :: vue-document
<!doctype html>
<title></title>
<meta name="description" content="">
<div id="app"></div>
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vue-document"></script>
<script>
Vue.use(VueDocument, {
injector: [VueDocument.titleInjector, VueDocument.metaInjector]
})
new Vue({
document: {
head: {
title: 'Custom Title',
meta: [
{name: 'description', content: 'Custom Description'}
]
}
},
template: '<div id="app">{{ message }}</div>',
el: '#app',
data: {
message: 'Hello Vue!'
}
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment