Bugsnag: Angular
A bugsnag-js plugin for Angular.
This package enables you to integrate Bugsnag's error reporting with an Angular (v2+) application at a detailed level. It provides an implementation of the @angular/core
ErrorHandler
which you can use to capture and report unhandled errors in your app.
Reported errors will contain useful debugging info from Angular's internals, such as the component and context.
Installation
npm i --save bugsnag-js bugsnag-angular
yarn add bugsnag-js bugsnag-angular
Usage
In your the root of your angular app, typically app.module.ts
:
import bugsnag from 'bugsnag-js';
import createPlugin from 'bugsnag-angular';
const bugsnagClient = bugsnag('API_KEY');
const BugsnagErrorHandler = bugsnagClient.use(createPlugin());
@NgModule({
providers: [ { provide: ErrorHandler, useClass: BugsnagErrorHandler } ]
})
See the example for more info.
Support
License
The Bugsnag JS library and official plugins are free software released under the MIT License. See LICENSE.txt for details.