kajol-project
v0.0.0
Published
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).
Downloads
3
Readme
Angular Library Example
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).
Tutorial
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!
Installation
git clone https://github.com/bersling/angular-library-example
cd angular-library-example
yarn install # or, if you don't have yarn, npm install
Usage
From the root of the project run
ng serve
The actual library module is in src/app/libex
the app module is just a testing ground which won't get published to npm.
That's why the libex
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!