Creating modules, services, and components
You may automatically create components, services, and modules in Angular by calling the relevant Angular CLI command, which generates the bare minimum code required for a basic component, service, or module.
Let's use the Angular CLI to generate our modules, services, and components.
Create a module for each feature of your application. This is a basic rule to follow. For instance, the home feed can be contained within a separate module. Splitting your application into modules enables you to lazily load components, and maintain it efficiently.
Creating modules
In our application, we'll utilize the following modules:
- A
users
module that incorporates components for login, signup, and profile. - A
feed
module that includes the component(s) necessary to show the posts retrieved using GraphQL. - A
shared
module may include elements that are shared with other modules in your application. - A root module containing...