UNPKG

@universis/common

Version:

Universis - common directives and services

49 lines (48 loc) 1.4 kB
import { OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal'; import { TranslateService } from '@ngx-translate/core'; export declare interface ShowErrorModalOptions { continueLink?: string; buttonText?: string; iconClass?: string; } export declare class ErrorModalComponent implements OnInit { private _translateService; bsModalRef: BsModalRef; private _router; code: any; language: any; continueLink: string; message: string; title: string; iconClass: string; buttonText: string; error: any; constructor(_translateService: TranslateService, bsModalRef: BsModalRef, _router: Router); hide(): Promise<void> | Promise<boolean>; ngOnInit(): void; } export declare class ErrorService { private _router; private _modalService; private _lastError; constructor(_router: Router, _modalService: BsModalService); /** * @param {*} error * @returns {Promise<boolean>} */ navigateToError(error: any): Promise<boolean>; showError(error: any, options?: ShowErrorModalOptions): void; /** * Sets last application error * @param {*=} err * @return ErrorService */ setLastError(err?: any): this; /** * Gets last application error * @return {any} */ getLastError(): any; }