Browse Source

Update config-state-service.md

pull/23275/head
Fahri Gedik 1 year ago
parent
commit
218e11ebfe
  1. 9
      docs/en/framework/ui/angular/config-state-service.md

9
docs/en/framework/ui/angular/config-state-service.md

@ -8,12 +8,13 @@ In order to use the `ConfigStateService` you must inject it in your class as a d
```js ```js
import { ConfigStateService } from '@abp/ng.core'; import { ConfigStateService } from '@abp/ng.core';
import { inject } from '@angular/core';
@Component({ @Component({
/* class metadata here */ /* class metadata here */
}) })
class DemoComponent { class DemoComponent {
constructor(private config: ConfigStateService) {} private config = inject(ConfigStateService);
} }
``` ```
@ -121,8 +122,12 @@ You can get the application configuration response and set the `ConfigStateServi
```js ```js
import {AbpApplicationConfigurationService, ConfigStateService} from '@abp/ng.core'; import {AbpApplicationConfigurationService, ConfigStateService} from '@abp/ng.core';
import { inject } from '@angular/core';
constructor(private abpApplicationConfigurationService: AbpApplicationConfigurationService, private config: ConfigStateService) { private abpApplicationConfigurationService = inject(AbpApplicationConfigurationService);
private config = inject(ConfigStateService);
constructor() {
this.abpApplicationConfigurationService.get({ includeLocalizationResources: false }).subscribe(config => { this.abpApplicationConfigurationService.get({ includeLocalizationResources: false }).subscribe(config => {
this.config.setState(config); this.config.setState(config);
}) })

Loading…
Cancel
Save