[Vuejs]-Push and Insert at a time in Vuejs and PHP

1👍

For starters I would say that a more standard way of doing it is pushing the todo in the Axios promise callback. This way you could also include the ID that is created from the backend in the object.

It’s not entirely clear what the issue is, if the issue is that you get the li but empty name, the problem is that when you’re doing app.todoList.push(this.todo) you’re printing the ‘todo_title’. What you need to do is push it with the key app.todoList.push({ todo_title: this.todo }).

👤Indyz

Leave a comment