I am trying to write a component library in Angular5. My library has a rich set of features/components. I am trying to use AgGrid Module in my component library.
I understand AgGrid Module needs to be aware of entryComponents at compile-time if i plan to use any of them in my grid. This leads me to an interesting problem.
@NgModule({
imports: [
BrowserModule,
AgGridModule.withComponents([
...
])
],
declarations: [
AgGridComponent
],
exports: [
AgGridComponent
]}) export class ComponentLibModule {}
I want to export my ComponentLibModule to be consumed by an application. The problem is, the application is going to define components which AgGridModule needs to treat as entryComponents.
How can i wrap my ComponentLibModule to return a decorated module which provides AgGrid with its entry components?