I am developing an Angular shared component (in its own repo, using ng-packagr and angular 5, to be published as an npm package) and I would like to use @ngrx/store because the component is complex enough to justify this. I would like the store to be internal to the component. In particular, this would mean that:
- integrating apps would not need to know about @ngrx to use my component
- integrating apps could use a separate @ngrx store from my component.
What kind of dependency relationships (in my component's package.json
, such as peerDependencies or dependencies) and initialization code (in my component's main module my-component.module.ts
) would my component need to accomplish this?
What kind of dependency relationships (in the integrating application's package.json
) and initialization code (in the integrating application's main module app.module.ts
) would the integrating application need to bring in, initialize, and use the component once it is published?