Creating library inside Anuglar app to make reusable in another projects.
Making utils-lib
library, default prefix fo selectors will be utils
$ ng g library utils-lib --prefix utils |
Create simple
directive in previously created library:
$ ng g d simple --project utils-lib --export |
To export my simple
directive from library in public-api.ts
:
/* * Public API Surface of utils */ export * from './lib/simple.directive'; export * from './lib/utils-lib.module'; |
Build lib package
$ ng build utils-lib |