Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-rollbar

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-rollbar

Angular 2+ Service for Rollbar error logging

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
32
increased by100%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 03 Jul 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc