Skip to content

Instantly share code, notes, and snippets.

@Maxobat
Created April 21, 2017 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Maxobat/d5319738b3ca22538778ff6849ab0478 to your computer and use it in GitHub Desktop.
Save Maxobat/d5319738b3ca22538778ff6849ab0478 to your computer and use it in GitHub Desktop.
import Vue from 'vue'
export default Vue.component('test-component', {
template: `
<div>
<h1>{{ heading }}</h1>
<ul>
<li v-for="item in listItems" v-if="item !== 'Not visible'" :key="item">
{{ item }}
</li>
</ul>
<p>More content</p>
</div>
`,
data: () => ({
heading: 'This is the heading',
listItems: [
'First',
'Not visible',
'Third',
],
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment