0

I am implementing a Rollbar in my angular 8 project.

providers: [
        { provide: ErrorHandler, useClass: RollbarErrorHandler },
        { provide: RollbarService, useFactory: rollbarFactory }
],

I want the angular ErrorHandler class to be used in the Local environment. But I want the rollbar to be used in the product environment.

Alisha
  • 1
  • Does this answer your question? [How to inject different service based on certain build environment in Angular2?](https://stackoverflow.com/questions/39942118/how-to-inject-different-service-based-on-certain-build-environment-in-angular2) – Andrew Allen Nov 08 '21 at 09:35

0 Answers0