libs/core/building-blocks/src/lib/page/chunk-loading-error-page/chunk-loading-error-page.component.ts

Extends

AbstractBuildingBlockPage<AbstractBuildingBlockFacade>

Metadata

Relationships

Index

Properties
Methods

Methods

reload
reload()
Returns : void
handleBuildBlocksChanged
handleBuildBlocksChanged(: [AbstractBuildingBlock[], AbstractBuildingBlock[]], allowedRetries: number)

Whenever the set of Building Blocks has changed ensure that the matching facades are created & connected or respectively disconnected and deleted from our internal facade map. We chose this approach instead of reusing facades as the underlying component is in fact deleted and recreated by the Angular renderer so we would have to introduce extra logic to re-initialize that component. It's easier to pretend that we encounter a Building Block the first time.

Parameters :
Name Type Optional Default value
[AbstractBuildingBlock[], AbstractBuildingBlock[]] No
allowedRetries number No 2
Returns : void
handlePageStatusUpdates
handlePageStatusUpdates(newStatus: ABSTRACT_PAGE_STATUS)
Parameters :
Name Type Optional
newStatus ABSTRACT_PAGE_STATUS No
Returns : void
onPageComplete
onPageComplete()
Returns : void
onPageDestroy
onPageDestroy()
Returns : void
onPageReady
onPageReady()
Returns : void
onPageWaiting
onPageWaiting()
Returns : void

Properties

pageData
Type : PageData
Default value : { navigation: { hidden: true }, pageActionConfig: { backButtonHidden: true, nextButtonHidden: true } }
connect$
Type : unknown
Default value : new Subject<void>()
disconnect$
Type : unknown
Default value : new Subject<void>()
facadeMap
Type : unknown
Default value : new Map<string, AbstractBuildingBlockFacade>()
Readonly id
Type : string
status
Type : unknown
Default value : ABSTRACT_PAGE_STATUS.WAITING
import { ChangeDetectionStrategy, Component } from '@angular/core';
import * as windowUtils from '../../utils/window-utils';
import { PageData } from '@allianz/taly-core';
import { AbstractBuildingBlockPage } from '../abstract-building-block-page';
import { AbstractBuildingBlockFacade } from '../../facade/abstract-building-block-facade';

@Component({
  selector: 'taly-chunk-loading-error-page',
  templateUrl: './chunk-loading-error-page.component.html',
  styleUrls: ['./chunk-loading-error-page.component.scss'],
  standalone: false,
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class ChunkLoadingErrorPageComponent extends AbstractBuildingBlockPage<AbstractBuildingBlockFacade> {
  override pageData: PageData = {
    navigation: {
      hidden: true
    },
    pageActionConfig: {
      backButtonHidden: true,
      nextButtonHidden: true
    }
  };

  reload() {
    windowUtils.reload();
  }
}
<img
  [ngSrc]="'assets/images/man-confused.png' | talyNormalizeUrl"
  width="288"
  height="162"
  class="nx-margin-top-3xl nx-margin-bottom-m"
  data-testid="image"
  priority
  alt="Confused man illustration"
/>

<h1 nxHeadline size="3xl" class="nx-margin-bottom-0" data-testid="headline" i18n>
  Something went wrong
</h1>

<p nxCopytext data-testid="description" i18n>Please try to reload the page</p>

<button nxButton="primary medium" data-testid="reload-button" (click)="reload()" i18n>
  Reload page
</button>

./chunk-loading-error-page.component.scss

:host {
  display: block;
  text-align: center;
  padding-inline: 16px;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""