Reputation: 9
In my Angular project, I am trying to use a component from a shared module where its child component is imported in the Dashboard module but facing this error.
app-send-email
is an Angular component, then verify that it is part of this module.app.routing.ts
const routes = [
{
path: 'dashboard',
loadChildren: () => import('./dashboard/dashboard.module').then(m => m.DashboardModule)
}]
dashboard.module.ts
import { SendEmailComponent } from './shared/send-email.component';
import { SharedDialogComponentModule } from '../shared/shared-dialog-component.module';
@NgModule({
imports: [SharedDialogComponentModule],
declarations: [ RecruiterSendEmailComponent ]
});
shared-dialog-component.module.ts
import { EmailDialogComponent } from '../../dashboard/shared/template/dialog/email-dialog/email-dialog.component';
@NgModule({
declarations: [EmailDialogComponent],
entryComponents: [EmailDialogComponent],
exports: [EmailDialogComponent]
})
email-dialog.component.html
<app-send-email></app-send-email>
Can anyone please help with this issue?
Upvotes: 0
Views: 589
Reputation: 17494
Well, you need to import the module SharedDialogComponentModule
import { SendEmailComponent } from './shared/send-email.component';
import { SharedDialogComponentModule } from '../shared/shared-dialog-component.module';
@NgModule({
import: [ SharedDialogComponentModule ]
declarations: [ RecruiterSendEmailComponent ]
});
Upvotes: 1