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 already grouped by type so this is a job you don't need to do again. We are going to focus our efforts on converting our files into modules.