mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4152] Updated folder structure of core docs (#4415)
* [ADF-4152] Moved core library docs into subfolders * [ADF-4152] Moved core library docs into subfolders * [ADF-4152] Manual fixes to core doc file links * [ADF-4152] Further automatic + manual link tidying
This commit is contained in:
committed by
Eugenio Romano
parent
285e56e9fb
commit
5fc05da7aa
54
docs/core/components/error-content.component.md
Normal file
54
docs/core/components/error-content.component.md
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
Title: Error Content Component
|
||||
Added: v2.4.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-09-13
|
||||
---
|
||||
|
||||
# [Error Content Component](../../../lib/core/templates/error-content/error-content.component.ts "Defined in error-content.component.ts")
|
||||
|
||||
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.
|
||||
|
||||
```ts
|
||||
this.router.navigate(['/error', errorCode]);
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| errorCode | `string` | "UNKNOWN" | Error code associated with this error. |
|
||||
| returnButtonUrl | `string` | "/" | Target URL for the return button. |
|
||||
| secondaryButtonUrl | `string` | "report-issue" | Target URL for the secondary button. |
|
||||
|
||||
## Details
|
||||
|
||||
Note that you need to provide values for the variables used in the view template.
|
||||
|
||||
You can customize your error messages by adding them to the translate files inside
|
||||
`lib/core/i18n`:
|
||||
|
||||
```json
|
||||
"ERROR_CONTENT": {
|
||||
"404": {
|
||||
"TITLE": "An error occurred.",
|
||||
"DESCRIPTION": "We couldn’t find the page you were looking for.",
|
||||
"SECONDARY_BUTTON": {
|
||||
"TEXT": ""
|
||||
},
|
||||
"RETURN_BUTTON": {
|
||||
"TEXT": "Back to home"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Empty Content component](empty-content.component.md)
|
Reference in New Issue
Block a user