libs/ngx-pfe/pfe-actions/reset-state/reset-state.model.ts
Properties |
|
excludeFromResetExpressions |
excludeFromResetExpressions:
|
Type : JsonPathExpression[]
|
Optional |
Provide an array of JSON expressions that will not be reset.
|
import { JsonPathExpression } from '../../models/jsonpath-expression-type.model';
import { PfeBaseActionConfig } from '../pfe-actions.model';
// eslint-disable-next-line @typescript-eslint/naming-convention
export const PfeResetStateActionType = 'PFE_RESET_STATE';
export interface PfeResetStateActionConfig extends PfeBaseActionConfig {
/**
* Completely reset the state.
*
* An example use case could be to reset the state before going back to the first page:
*
```json
{
"pageId": "lastPage",
"nextOptionList": [
{
"nextPageId": "firstPage"
}
],
"onNavigationStartActions": [
{
"type": "PFE_RESET_STATE"
}
]
}
```
*/
type: typeof PfeResetStateActionType;
/**
* Provide an array of JSON expressions that will not be reset.
```json
{
"onNavigationStartActions": [
{
"type": "PFE_RESET_STATE",
"excludeFromResetExpressions": ["$.myState.keepThisState", "$.importantState"]
}
]
}
```
*/
excludeFromResetExpressions?: JsonPathExpression[];
}