0.1.2 • Published 6 years ago

angular-airbrake v0.1.2

Weekly downloads
9
License
MIT
Repository
github
Last release
6 years ago

Angular (2+) Airbrake Integration

Build Status Coverage Status

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

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.

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.

npm install
npm test

Disclaimer

This project is not affiliated in anyway with Airbrake.

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago