Skip to content

Instantly share code, notes, and snippets.

@johnsardine
Last active November 16, 2017 21:52
Show Gist options
  • Save johnsardine/52234e2cf3dbd9cedcdb9ed7c480730d to your computer and use it in GitHub Desktop.
Save johnsardine/52234e2cf3dbd9cedcdb9ed7c480730d to your computer and use it in GitHub Desktop.
4 - Simple Vue component sample
<div id="HelloSubject">
<h1>Hello {{ subject }}!</h1>
</div>
Vue.component('hello-subject', {
template: '#HelloSubject',
props: {
subject: {
type: String,
},
},
});
<hello-subject :subject="World"></hello-subject>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment