File

libs/common/ui/src/chunk-loading-error-page/chunk-loading-error-page.component.ts

Extends

AbstractBuildingBlockPage

Metadata

Index

Properties
Methods

Methods

reload
reload()
Returns : void
handleBuildBlocksChanged
handleBuildBlocksChanged(undefined: [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$
Default value : new Subject<void>()
disconnect$
Default value : new Subject<void>()
facadeMap
Default value : new Map<string, AbstractBuildingBlockFacade>()
Readonly id
Type : string
status
Default value : ABSTRACT_PAGE_STATUS.WAITING
import {
  AbstractBuildingBlockFacade,
  AbstractBuildingBlockPage,
  PageData
} from '@allianz/taly-core';
import { Component } from '@angular/core';

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

  reload() {
    window.location.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 ""