I thought I understood how ngModule
worked but apparently not. I have 3 modules: AppModule
, AmpedFormsModule
, and AmpedCommonMod
Its hard to say exact problem but there are few suggestions,
1) change BroswerModule
to CommonModule
in AppCommonModule
.Keep in mind BroswerModule
should be imported by AppModule
or RootModule
only.
@NgModule({
imports : [CommonModule, FormsModule],
...
})
2) Not sure but it seems you are creating circular dependencies by importing module into each other but as said not sure though.
@NgModule({
imports : [FormsModule, AmpedFormsModule], //<<< here
})
@NgModule({
imports : [ HttpModule, AmpedCommonModule ], //<<< here
...
})
3) If AmpedFormsModule
and AmpedCommonModule
are lazy modules don't forget to put default keyword before class key word
eg. export default class AmpedFormsModule {}