Open Closed

The attribute "setState" does not exist on the type "ConfigStateService"? #4652


User avatar
0
deathmid2233@gmail.com created

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);
  })
}

2 Answer(s)
  • User Avatar
    0
    mahmut.gundogdu created
    Support Team

    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

  • User Avatar
    0
    deathmid2233@gmail.com created

    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);
    
Made with ❤️ on ABP v8.3.0-preview Updated on July 04, 2024, 07:07