0.0.225 • Published 3 years ago

front-common-library-test v0.0.225

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

FrontCommonLibrary

This library was generated with Angular CLI version 8.1.1.

Code scaffolding

Run ng generate component component-name --project front-common-library to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project front-common-library.

Note: Don't forget to add --project front-common-library or else it will be added to the default project in your angular.json file.

Build

Run ng build front-common-library 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, go to the dist folder cd dist/front-common-library and run npm publish.

How to use the library

Install the NPM package by executing this command:

npm install front-common-library@latest

Then add this code to your angular project:

import { NgModule } from '@angular/core';
import { UtilModule, Config } from 'front-common-library';

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 to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.