I'm trying to create a simple feature module and my imports are failing and I don't know why. Below is the important sections of my feature module
@NgModule({
declarations: [
ProducerLookupComponent,
ProducerAddComponent
]
exports: [
ProducerLookupComponent,
ProducerAddComponent
]
})
export class ProducerModule { }
I import the ProducerModule in my app module. Then I want to use ProducerLookupComponent and ProducerAddComponent as templates for a dialog, so I'm not adding their selectors in another html template anywhere. This is the only thing that seems to be different than the basic tutorials on creating feature modules. I've created other feature modules where I just use components via their selectors just fine.
So in a ts file where I create the dialog, I have code like this
import { ProducerLookupComponent, ProducerAddComponent} from '../producer/producer.module';
There I get then is
ERROR in src/app/application-initiation-fio/application-initiation-fio.component.ts:8:10 - error TS2459: Module '"D:/code/ade/client/src/app/producer/producer.module"' declares 'ProducerLookupComponent' locally, but it is not exported.
Note I can 'fix' the error by adding export statements in my Producer Module like this
export{ ProducerLookupComponent } from './producer-lookup/producer-lookup.component';
export{ ProducerAddComponent } from './producer-add/producer-add.component';
But that seems redundant.
Any help would be appreciated, thanks!