This is an example for how to build an Angular library from **mid 2017** for currently **Angular 4** (works just as well with Angular 2).
npm install kajol-project-checkThis is an example for how to build an Angular library
from mid 2017 for currently Angular 4 (works just as well with Angular 2).
It's probably best if you read the short tutorial first at:
http://how-to-write-a-typescript-library.com/angular2
because there's nothing magical about this and you could just as well
use the AngularCli. That's how I usually do it, I just
follow the steps in the tutorial and don't download this library-starter,
but it's really up to you. Anyways, you'll understand this source
code much better once you read the tutorial!
```
git clone https://github.com/bersling/angular-library-example
cd angular-library-example
yarn install # or, if you don't have yarn, npm install
From the root of the project run
``
ng serve
The actual library module is in src/app/libexlibex
the app module is just a testing ground which won't get published to npm.
That's why the directory has it's own
package.json!
So for development implement your library in libex`
and test your library by using it in the app module! Since
it's a project launched with Angular Cli you get all the
benefits from hot reloading etc!