Finally, we have a module for the entity. Angular modules can be used to consolidate all components, directives, pipes, and services of an entity so that they can be imported into other modules easily. The StoreProductModule module is defined in product.module.ts:
@NgModule({
imports: [
StoreSharedModule,
RouterModule.forChild(ENTITY_STATES)
],
declarations: [
ProductComponent,
ProductDetailComponent,
ProductDialogComponent,
ProductDeleteDialogComponent,
ProductPopupComponent,
ProductDeletePopupComponent,
],
entryComponents: [
ProductComponent,
ProductDialogComponent,
ProductPopupComponent,
ProductDeleteDialogComponent,
ProductDeletePopupComponent,
],
providers: [
ProductService,
ProductPopupService,
ProductResolvePagingParams,
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class StoreProductModule {}
The module declares the components and registers services provided by it. The module also imports shared modules so that it can access shared services and components. The module is imported by the StoreEntityModule defined in entity.module.ts under src/main/webapp/app/entities.