# FrontCommonLibrary

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.1.1.

## Code scaffolding

Run `ng generate component component-name --project front-common-library-3` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project front-common-library-3`.
> Note: Don't forget to add `--project front-common-library-3` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build front-common-library-3` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build front-common-library-3`, go to the dist folder `cd dist/front-common-library-3` and run `npm publish`.

## How to use the library

Install the NPM package by executing this command: 
```bash
npm install front-common-library-3@latest
```

Then add this code to your angular project:
```typescript
import { NgModule } from '@angular/core';
import { UtilModule, Config } from 'front-common-library-3';

const config: Config = {
  api_url: 'http://localhost:8080',
  env: 'DEV'
};

@NgModule({
  declarations: [...],
  imports: [
    UtilModule.forRoot(config),
  ],
  providers: [...],
  bootstrap: [...]
})
export class AppModule {
  constructor() {}
}
```

## Running unit tests

Run `ng test front-common-library-3` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
