How to build Angular 4 component libraries with Angular CLI + ng-packagr + state mgmt?

Trying to wrap your head around creating an angular node module that will have the state mgmt Ngrx.

I built the node module using this guide: https://medium.com/@nikolasleblanc/building-an-angular-4-component-library-with-the-angular-cli-and-ng-packagr-53b2ade0701e

I am currently stuck in a view of the ngrx child state, so when I load my module from the NPM module, I can somehow determine to be part of my main mgmt application state.

As I understand it, I can do this by somehow going to the root of using / setting ModuleWithProviders

+6
source share
1 answer

You can use this yoma generator to make the seed of your library and add the ngrx or anif functions you want to add.

With this, ng-packagr is not required because the starter kit is ready to compile AOT angular libraries by default.

https://github.com/jvandemo/generator-angular2-library

+2
source

All Articles