December 2016
Beginner to intermediate
334 pages
6h 25m
English
When we were rewriting the shopping list application using simple components, we lost the application's functionality. The exercise suggests using an events emitting system in order to bring the functionality back.
The code we ended up with in this section was looking similar to what is in the chapter3/vue-shopping-list-simple-components folder.
Why doesn't it work? Check the devtools error console. It states the following:
[Vue warn]: Property or method "addItem" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option. (found in component <add-item-component>)
Aha! This happens because inside add-item-template we are calling the addItem method ...
Read now
Unlock full access