In file cart_lab / app / assets / javascripts / book_controller.js, line 27 to 37:
Initialization of this.total and this.itemCount do not work. The array this.items seems to be empty (size 0) but it is not when it is displayed on the view.
This issue is because when you call the server to get some data, you don't know when you will get the result. To be sure you have the result and use it, you have to use the function then() on the request.
In file cart_lab / app / assets / javascripts / book_controller.js, line 27 to 37:
Initialization of this.total and this.itemCount do not work. The array this.items seems to be empty (size 0) but it is not when it is displayed on the view.