[ADF-4867] adf-error-component refactor (#5056)

* Refactor the adf-error-component
Move the custom buttons on demoshell
Fix unit test
Remove usefull e2e

* Add basic example
This commit is contained in:
Maurizio Vitale
2019-09-07 10:29:19 +01:00
committed by Eugenio Romano
parent 4d7c07ef93
commit 4de00fd6ca
12 changed files with 98 additions and 97 deletions

View File

@@ -24,8 +24,6 @@ this.router.navigate(['/error', errorCode]);
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| errorCode | `string` | | 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
@@ -49,6 +47,20 @@ You can customize your error messages by adding them to the translate files insi
}
```
## How to customise the action button.
The errorContentComponent allows you to customise the actions section using the selector `adf-error-content-actions`.
For example you can have a custom action button with the following code
```html
<adf-error-content [errorCode]="errorCode">
<div adf-error-content-actions>
<button type="button">MyAction</button>
</div>
</adf-error-content>
```
## See also
- [Empty Content component](empty-content.component.md)