Create Todo
In this episode you are going to learn how to create new todo item using Vue.js 2.0 and then save it to our OctoberCMS database.
First we are going to be creating new component for creating our todos. This component is going to do two things - first it’s going to add our new todo to the Vue.js list of todos, and display it on the page visually.
Of course if you refresh the page that new todo will disappear, because we need to save that todo item into our October CMS database. That is going to be the second thing that our component is going to be doing.
Also we are going to learn about v-show
, v-model
and $emit
method. And I’m going to show you how to use axios to post data to your api endpoint.