in VueJS

VueJS: Single File Components

When you're defining new components in VueJS you can use the method Vue.component like we've used in a previous tutorial about Vue.

<script> Vue.component('todo-item', { props: ['todo'], template: '<li>{{ todo.task }}</li>' }) var app = new Vue({ el: '#app', data: { todos: [ { task: 'Learn JavaScript'},

Upgrade to access all content on Paulund

Members unlock all tutorials and snippets

Access to all downloadable content

Access to code examples before others

Sign Up Now

Already a member? Login here

Subscribe To The Weekly Newsletter

Get weekly updates to your email