alfresco-ng2-components/docs/core/error-content.component.md
Eugenio Romano 2e0945b0cc e2e test error page and fix (#3672)
* fix wrong input parameter functionality

* not reload the page to go to the content service page

* navigate instead to reload to go to the process service page
2018-08-14 15:42:55 +01:00

1.2 KiB
Raw Blame History

Added, Status, Last reviewed
Added Status Last reviewed
v2.4.0 Active 2018-06-13

Error Content Component

Displays info about a specific error.

Basic Usage

Once you have caught the error in your server you will need to redirect to /error/errorCode to display information about that error.

this.router.navigate(['/error', errorCode]);

Properties

Error Content Component

Name Type Default Description
errorCode string Error code
returnButtonUrl string "/" URL for the return button
secondaryButtonUrl string "report-issue" (Optional) URL for the secondary button

Note that you will also have to provide values for the variables used in the view template.

Details

You can customize your error messages by adding them to the translate files inside lib/core/i18n:

"ERROR_CONTENT": {
    "404": {
      "TITLE": "An error occurred.",
      "DESCRIPTION": "We couldnt find the page you were looking for.",
      "SECONDARY_BUTTON": {
        "TEXT": ""
      },
      "RETURN_BUTTON": { 
        "TEXT": "Back to home"
      }
    }
  }

See also