https://docs.abp.io/en/abp/latest/UI/Angular/Config-State-Service#set-state
Create an error/problem report:
- ** ABPFrameVersion:** v7.0(latest)**
- ** UIType**:Angular
- Database provider:EF Core
- Repeat the steps of the problem:“
import {AbpApplicationConfigurationService, ConfigStateService} from '@abp/ng.core';
constructor(private abpApplicationConfigurationService: AbpApplicationConfigurationService, private config: ConfigStateService) {
this.abpApplicationConfigurationService.get().subscribe(config => {
this.config.setState(config);
})
}
3 Answer(s)
-
0
The documanation is obsolate. It will be updated. If you want to update app state you can use this code
configStateService.refreshAppState()
https://github.com/abpframework/abp/blob/0c3e4c4ba3b2e0b9c3fe3031c53d79c255b97655/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts#L64
-
0
The documanation is obsolate. It will be updated. If you want to update app state you can use this code
configStateService.refreshAppState()
https://github.com/abpframework/abp/blob/0c3e4c4ba3b2e0b9c3fe3031c53d79c255b97655/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts#L64
I want to set App status,like this:
this.config.setState(newConfigObj);
-
0
The documanation is obsolate. It will be updated.
If you want to update app state you can use this codeconfigStateService.refreshAppState()
https://github.com/abpframework/abp/blob/0c3e4c4ba3b2e0b9c3fe3031c53d79c255b97655/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts#L64
I want to set App status,like this:
this.config.setState(newConfigObj);
By default, you cannot manually update the Config state. But if you have to, ABP is open source. Copy the Config-StatService in your local, Change name of class Like MyConfigStateService then override via DI.
so you can expose store objects as public or add new methods. also we are considered the changes. Maybe in the future, we will change. source code: https://github.com/abpframework/abp/blob/dev/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts