File

libs/ngx-pfe/pfe-actions/navigate/navigate-action.model.ts

Description

To register this action, import the PfeNavigateActionModule module into the same app module as the NgxPfeModule.

Extends

PfeBaseActionConfig

Index

Properties

Properties

ignoreDestination
ignoreDestination: boolean
Type : boolean
Optional

This action is also able to handle trigger points from within another navigation. By default, the destination of the current navigation is checked. If the destination is the same as the configured pageId, the current navigation is not stopped and no new navigation is triggered. This prevents an endless loop of starting a navigation and immediately aborting it again.

In some use cases it might be desirable to ignore this check. Set this flag to true, to do so.

pageId
pageId: string
Type : string

The destination pageId of the triggered navigation

type
type:

This action triggers a navigation to a pageId.

An example configuration could look like this:

onNavigationStartActions: [
{
type: 'PFE_NAVIGATE',
pageId: 'targetPageId',
},
]

If a navigation to the error page is in progress, it will not be aborted and no new navigation will be triggered by this action.

import { PfeBaseActionConfig } from '../pfe-actions.model';

// eslint-disable-next-line @typescript-eslint/naming-convention
export const PfeNavigateActionType = 'PFE_NAVIGATE';

/**
 * To register this action, import the `PfeNavigateActionModule` module into the same app module as the NgxPfeModule.
 *
 */
export interface PfeNavigateActionConfig extends PfeBaseActionConfig {
  /**
   * This action triggers a navigation to a pageId.
   *
   * An example configuration could look like this:
   *
```
onNavigationStartActions: [
  {
    type: 'PFE_NAVIGATE',
    pageId: 'targetPageId',
  },
]
```
   *
   * If a navigation to the error page is in progress, it will not be aborted and no new navigation will be triggered
   * by this action.
   */
  type: typeof PfeNavigateActionType;
  /**
   * The destination pageId of the triggered navigation
   */
  pageId: string;
  /**
   * This action is also able to handle trigger points from within another
   * navigation.
   * By default, the destination of the current navigation is checked.
   * If the destination is the same as the configured pageId,
   * the current navigation is not stopped and no new navigation is triggered.
   * This prevents an endless loop of starting a navigation and immediately aborting it again.
   *
   * In some use cases it might be desirable to ignore this check. Set this flag to true, to do so.
   */
  ignoreDestination?: boolean;
}

results matching ""

    No results matching ""