Creating the Shop module

To modularize our application, we are going to create a module called Shop that will contain our entire application. This module will contain other submodules and components. This hierarchical structure will help you to keep coherence in your code.

As the first approach, group your components by file and by type. This means that each component of the modules will be in a file and the files will be grouped by type in a folder. For example, there is a folder named services. This means that all services will be in this folder, and each service will be completely defined in one file. As a convention, the components will have the same name as the file in which they are, without the extension of course.

Actually, the files are ...

Get KnockoutJS Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.