import { ErrorHandler , Injectable } from "@angular/core" ; import { LoggingService } from "./logging.service" ; example @ Injectable ( ) export class LoggingErrorHandler implements ErrorHandler { constructor ( private logger ) { } param error handleError ( error ) { this . logger . error ( error ) ; } }