Trying to wrap up my head around creating an angular node module that will have a state mgmt Ngrx.
I've been building node module using this guide: https://medium.com/@nikolasleblanc/building-an-angular-4-component-library-with-the-angular-cli-and-ng-packagr-53b2ade0701e
Currently stuck at introducing ngrx child state, so that when I download from NPM my module, I can somehow define for to be part of my main app state mgmt.
As I understand I can do this somehow going the root of using/setting up ModuleWithProviders
Inside that directory, four files are created: A CSS file for the component styles. An HTML file for the component template. A TypeScript file with a component class named HeroDetailComponent .
The Purpose of Angular Libraries To create a library, we generate it by “ng generate” command, built it by “ng build” command, publish by “npm publish” command. To use a library we install it by “ng i “ command.
You can use yeoman generator to make your library seed and add the ngrx
features or anything you want to add.
So ng-packagr
is not necessary because the starter kit is prepared to compile AOT
angular libraries by default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With