@appsignal/angular

Installation

Add the @appsignal/angular and @appsignal/javascript packages to your package.json. Then, run yarn install/npm install.

You can also add these packages to your package.json on the command line:

yarn add @appsignal/javascript @appsignal/angular
npm install --save @appsignal/javascript @appsignal/angular

Usage

AppsignalErrorHandler

The default Angular integration is a class that extends the ErrorHandler class provided by @angular/core. In a new app created using @angular/cli, your app.module.ts file might include something like this:

import { ErrorHandler, NgModule } from "@angular/core";
import Appsignal from "@appsignal/javascript";
import { createErrorHandlerFactory } from "@appsignal/angular";
 
const appsignal = new Appsignal({
  key: "YOUR FRONTEND API KEY",
});
 
@NgModule({
  // other properties
  providers: [
    {
      provide: ErrorHandler,
      useFactory: createErrorHandlerFactory(appsignal),
    },
  ],
  // other properties
})
export class AppModule {}

Need more help?

Contact us and speak directly with the engineers working on AppSignal. They will help you get set up, tweak your code and make sure you get the most out of using AppSignal.

Contact us

Start a trial - 30 days free

AppSignal is a great way to monitor your Ruby, Elixir & Node.js applications. Works great with Rails, Phoenix, Express and other frameworks, with support for background jobs too. Let's improve your apps together.

Start a trial