The limits of the application
Finally we have a modularized application. Nevertheless, it has some limitations:
What is the behavior of the browser's back and forward buttons? If we try to use them our application doesn't work as it should.
If we want to split our application into pages, do we always have to show and hide templates in the same page?
As you can see, there is a lot of work to do. Knockout is good, but maybe it needs to collaborate with other libraries to solve other issues.
There is a copy of the code developed in this chapter at https://github.com/jorgeferrando/knockout-cart/tree/chapter6RequireJS.