EDIT :
This error frequently comes up when we are not importing
, providing
, or declaring
the angular modules
, services
, components
properly.
Make sure that we should only
- import
modules
and NOT the components
or services
- declare
components
and NOT the modules
or services
.
- provide
services
and NOT components
or modules
.
Original Answer :
You don't have to really import MyComboBox
in your App Module. Since you have already exported it in CoreModule
. So I would suggest you to remove MyComboBox
from your imports array in AppModule
. Importing CoreModule
will give you MyComboBox
component within AppModule
.
app.module.ts
@NgModule({
declarations: [
AppComponent,
MyComboBox
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
DragulaModule,
CoreModule
],
// viewProviders: [ DragulaService ],
providers: [HelperService],
bootstrap: [AppComponent]
})
Note : You cannot import component freely like you are doing there. It has to be contained within the module to be imported.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…