@igo2/core
Version:
32 lines (31 loc) • 1.9 kB
TypeScript
import { HttpErrorResponse } from '@angular/common/http';
import { Injector } from '@angular/core';
import { ConfigService } from '@igo2/core/config';
import { LanguageService } from '@igo2/core/language';
import { ActiveToast, IndividualConfig } from 'ngx-toastr';
import { BehaviorSubject } from 'rxjs';
import { Message } from './message.interface';
import * as i0 from "@angular/core";
export declare class MessageService {
private injector;
private configService;
private languageService;
messages$: BehaviorSubject<Message[]>;
private options?;
private activeMessageTranslations;
constructor(injector: Injector, configService: ConfigService, languageService: LanguageService);
private get toastr();
showError(httpError: HttpErrorResponse): ActiveToast<any>;
message(message: Message): void;
success(text: string, title?: string, options?: Partial<IndividualConfig>, textInterpolateParams?: object, titleInterpolateParams?: object): ActiveToast<any>;
error(text: string, title?: string, options?: Partial<IndividualConfig>, textInterpolateParams?: object, titleInterpolateParams?: object): ActiveToast<any>;
info(text: string, title?: string, options?: Partial<IndividualConfig>, textInterpolateParams?: object, titleInterpolateParams?: object): ActiveToast<any>;
alert(text: string, title?: string, options?: Partial<IndividualConfig>, textInterpolateParams?: object, titleInterpolateParams?: object): ActiveToast<any>;
show(text: string, title?: string, options?: Partial<IndividualConfig>, textInterpolateParams?: object, titleInterpolateParams?: object): ActiveToast<any>;
private handleNgxToastr;
remove(id?: number): void;
removeAllAreNotError(): void;
private handleTemplate;
static ɵfac: i0.ɵɵFactoryDeclaration<MessageService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<MessageService>;
}