1.3.1 • Published 6 years ago

@clearpeaks/cp-common v1.3.1

Weekly downloads
1
License
-
Repository
-
Last release
6 years ago

CP Common - Angular 6+ library

A shared library of Angular Components, Services, Pipes, Directives and more.

Installation

npm i @clearpeaks/cp-common --save

Basic usage

Import the CpCommonModule into your App Module:

import { CpCommonModule } from '@clearpeaks/cp-common';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    CpCommonModule.forRoot({
      // ... Your config here
    })
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Module configuration

Some items in this module require / accept custom configuration.

This config object can be provided as the CpCommonModule.forRoot() method argument.

Config options

PropertyDescriptionType
urlEndpointProvides a base URL for all your endpoints when used with ApiServiceString
logEnabledIf true, error logging is enabled in the ErrorHandlerServiceBoolean
logEndpointEndpoint for posting error messages from ErrorHandlerServiceString
logHttpRequestIf true, LoggerInterceptor will log HTTP requests to the consoleBoolean
logHttpResponseIf true, LoggerInterceptor will log HTTP responses to the consoleBoolean
httpLogEnabledToggle HTTP logging off and onBoolean

Contents

Components

  • SpinnerComponent
  • PaginationComponent

Services

  • ApiService
  • ErrorHandlerService

Pipes

  • SlugifyPipe
  • CurrencyCommaPipe
  • ThousandSuffixesPipe

Interceptors

  • JwtInterceptor
  • LoggerInterceptor

Licence

MIT

1.3.1

6 years ago

1.3.0

6 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.1

7 years ago