diff --git a/src/lib/services/toaster.service.ts b/src/lib/services/toaster.service.ts index 959f8f3..bd22d05 100644 --- a/src/lib/services/toaster.service.ts +++ b/src/lib/services/toaster.service.ts @@ -1,12 +1,12 @@ +import { HttpErrorResponse, HttpStatusCode } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import { ActiveToast, ToastrService } from 'ngx-toastr'; -import { IndividualConfig } from 'ngx-toastr/toastr/toastr-config'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { NavigationStart, Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; -import { HttpErrorResponse, HttpStatusCode } from '@angular/common/http'; +import { ActiveToast, ToastrService } from 'ngx-toastr'; +import { IndividualConfig } from 'ngx-toastr/toastr/toastr-config'; import { filter, tap } from 'rxjs/operators'; import { ErrorMessageService } from './error-message.service'; -import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const enum NotificationType { SUCCESS = 'SUCCESS', @@ -65,8 +65,8 @@ export class Toaster { return this._toastr.error(resultedMsg, options?.title, options); } - rawError(message: string) { - return this._toastr.error(message); + rawError(message: string, config?: Partial>) { + return this._toastr.error(message, undefined, config); } info(message: string, options?: Partial): ActiveToast {