Last active
April 21, 2017 09:30
-
-
Save shyiko/9ef8b689dd731dff9e3a03c2ba29705b to your computer and use it in GitHub Desktop.
jsbin :: vue-document
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
<!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