File
Public
executeActionUpdateStateOnBackend
|
Default value : () => {...}
|
|
import { Injectable } from '@angular/core';
import { LAST_VISITED_PAGE_STATE_KEY } from './../../services/pfe-navigation-service/navigation-util.service';
import { PfeStateService } from './../../services/pfe-state-service/state.service';
import { PfeUpdateStateOnBackendActionConfig } from './update-state-on-backend.model';
@Injectable()
export class PfeUpdateStateOnBackendService {
constructor(protected pfeStateService: PfeStateService) {}
public executeActionUpdateStateOnBackend = async (actionConfig: PfeUpdateStateOnBackendActionConfig) => {
if (actionConfig.pageToReturnTo) {
this.pfeStateService.storeValue(LAST_VISITED_PAGE_STATE_KEY, actionConfig.pageToReturnTo);
}
await this.pfeStateService.storeState();
};
}