I don\'t quite to figure out, why Angular2 have two concepts?
Module
Component
What is the difference between them and w
Module and Component have hardly anything in common, except that they are classes with decorators and providers can registered with them.
A component is a visible part of your application with optional behavior (event handlers)
Modules were introduced to split your application for lazy loading.
SubModule is usually a set of services, components, directives, and pipes that build together a reusable feature.
By adding a module to imports: [...]
of another module, all its content is made available to the importing module.
SubComponent is not really a term in Angular2. There are just components. One special component is the root component. The difference is that the root component is created by bootstrapping an Angular2 application, while other components are created because their selector matches HTML in the view of another component.
Therefor, except of the root component all components are subcomponents.
Basically Module and Component both are different terms.
How ?
Module in Angular is set of Components, Services, Filters, or some another smaller modules too, or we can say where you import all these in order to use later in the app for future use. in a single app there can be one or more than one module may exist.
Whereas Component is a single layer or view to perform some actions etc. components can be lazy loaded as per requirements.