I am using Angular 5.
I have a module called PostLoginPartnersModule
and within it I have a component called SearchUsersComponent
and another module ListingUsersModule
. I want to use
SearchUsersComponent
in a component which exist in ListingUsersModule
.
I am getting an error:
core.js:1448 ERROR Error: Uncaught (in promise): Error: Type SearchUsersComponent is part of the declarations of 2 modules: PostLoginPartnersModule and ListingUsersModule! Please consider moving SearchUsersComponent to a higher module that imports PostLoginPartnersModule and CareGroupModule. You can also create a new NgModule that exports and includes SearchUsersComponent then import that NgModule in PostLoginPartnersModule and ListingUsersModule. Error: Type SearchPatientComponent is part of the declarations of 2 modules: PostLoginPartnersModule and ListingUsersModule! Please consider moving SearchUsersComponent to a higher module that imports PostLoginPartnersModule and ListingUsersModule. You can also create a new NgModule that exports and includes SearchPatientComponent then import that NgModule in PostLoginPartnersModule and ListingUsersModule.