https://github.com/nextfaze/angular-airbrake
Airbrake error reporting service for Angular 2+
https://github.com/nextfaze/angular-airbrake
Last synced: 4 days ago
JSON representation
Airbrake error reporting service for Angular 2+
- Host: GitHub
- URL: https://github.com/nextfaze/angular-airbrake
- Owner: NextFaze
- License: mit
- Created: 2018-01-12T07:27:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-15T07:42:48.000Z (over 8 years ago)
- Last Synced: 2025-03-06T06:51:58.297Z (over 1 year ago)
- Language: TypeScript
- Size: 177 KB
- Stars: 1
- Watchers: 9
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular (2+) Airbrake Integration
[](https://travis-ci.org/NextFaze/angular-airbrake) [](https://coveralls.io/github/NextFaze/angular-airbrake?branch=master)
This package provides an Angular 2+ service for logging to Airbrake.
## Installation
npm install angular-airbrake
### Dependencies
This module relies on the official `airbrake-js` npm package. In addition, it has Angular >= 2 as a peer dependency.
## Usage
### Bootstrap the module
```ts
import { AirbrakeModule, AirbrakeService } from 'angular-airbrake'
NgModule({
imports: [
AirbrakeModule.forRoot({
// Your Airbrake options here, follow the Airbrake documentation
})
],
providers: [
{ provide: ErrorHandler, useClass: AirbrakeService }
]
})
export class MyAngularApp {}
```
### Use the service
Let the Angular DI do all the magic for you.
```ts
import { Component } from '@angular/core'
import { AirbrakeService } from 'angular-airbrake';
@Component(...)
export class MyComponent {
constructor (airbrake: AirbrakeService) {
airbrake.error('Logging to Airbrake!');
}
}
```
## Development
We are using Angular CLI to make things a little bearable.
```sh
npm install
npm test
```
## Disclaimer
This project is not affiliated in anyway with Airbrake.