Socket
Socket
Sign inDemoInstall

angular-rollbar

Package Overview
Dependencies
17
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angular-rollbar

Angular 2+ Service for Rollbar error logging


Version published
Weekly downloads
41
increased by105%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Angular (2+) Rollbar Integration

Build Status Coverage Status

This package provides an Angular 2+ service for logging to Rollbar.

Installation

npm install angular-rollbar

Dependencies

This module relies on the official rollbar-browser npm package. In addition, it has Angular >= 2 as a peer dependency.

Usage

Bootstrap the module

import { RollbarModule, RollbarService } from 'angular-rollbar'

NgModule({
    imports: [
        RollbarModule.forRoot({
            accessToken: 'YOUR ROLLBAR CLIENT TOKEN'
        })
    ],
    providers: [
        { provide: ErrorHandler, useClass: RollbarService }
    ]
})
export class MyAngularApp {}

Use the service

Let the Angular DI do all the magic for you.

import { Component } from '@angular/core'
import { RollbarService } from 'angular-rollbar';

@Component(...)
export class MyComponent {

    constructor (rollbar: RollbarService) {
        rollbar.info('Logging to Rollbar!');
    }
}

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 Rollbar Inc. We do like their service though.

Keywords

FAQs

Last updated on 03 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc