feat(theme-shared): add destroy subject to custom error component

#2097
pull/2142/head
mehmet-erim 6 years ago
parent 5809d1ba01
commit 707c37c04d

@ -41,6 +41,7 @@ export class ErrorComponent implements AfterViewInit, OnDestroy {
if (this.customComponent) {
const customComponentRef = this.cfRes.resolveComponentFactory(this.customComponent).create(null);
customComponentRef.instance.errorStatus = this.status;
customComponentRef.instance.destroy$ = this.destroy$;
this.containerRef.nativeElement.appendChild((customComponentRef.hostView as EmbeddedViewRef<any>).rootNodes[0]);
customComponentRef.changeDetectorRef.detectChanges();
}

@ -39,7 +39,7 @@ export const DEFAULT_ERROR_MESSAGES = {
details: 'The resource requested could not found on the server.',
},
defaultError500: {
title: '500',
title: 'Internal server error',
details: 'Error detail not sent by server.',
},
};
@ -106,11 +106,11 @@ export class ErrorHandler {
: this.showError(
{
key: 'AbpAccount::DefaultErrorMessage404',
defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title,
defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.details,
},
{
key: 'AbpAccount::DefaultErrorMessage404Detail',
defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.details,
defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title,
},
);
break;

@ -25,7 +25,6 @@ export class ConfirmationService extends AbstractToaster<Confirmation.Options> {
options?: Confirmation.Options,
): Observable<Toaster.Status> {
this.listenToEscape();
return super.show(message, title, severity, options);
}

Loading…
Cancel
Save