1.0.9 • Published 5 years ago

ngx-runtime-error v1.0.9

Weekly downloads
13
License
MIT
Repository
-
Last release
5 years ago

NGX-Runtime-Error

A library which capture error from your website and notify to your email address.

Installation

Use the package manager npm to install ngx-runtime-error.

npm i ngx-runtime-error

Usage

import { ErrorHandler } from '@angular/core';
import { isDevMode } from '@angular/core';
import { NgxRuntimeError } from 'ngx-runtime-error'
class RuntimeError implements ErrorHandler {
  constructor(private ngx_error:NgxRuntimeError) { 
    const params = {
            email : 'YOUR_EMAIL_ADDRESS',
            prodMode : !isDevMode() //for Production
        }
     this.ngx_error.init(params);
  }

  handleError(error) {
    console.error(error)
    this.ngx_error.captureExceptions(error)
  }

}

@NgModule({
  providers: [NgxRuntimeError,{provide: ErrorHandler, useClass: RuntimeError}]
})

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Links

GITHUB, NPM

License

MIT

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago