From 218e11ebfe1fe8806b7b9f065e8eb1827e539116 Mon Sep 17 00:00:00 2001 From: Fahri Gedik Date: Tue, 8 Jul 2025 15:27:10 +0300 Subject: [PATCH] Update config-state-service.md --- docs/en/framework/ui/angular/config-state-service.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/en/framework/ui/angular/config-state-service.md b/docs/en/framework/ui/angular/config-state-service.md index f5415d38b3..14e370fe6f 100644 --- a/docs/en/framework/ui/angular/config-state-service.md +++ b/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 import { ConfigStateService } from '@abp/ng.core'; +import { inject } from '@angular/core'; @Component({ /* class metadata here */ }) 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 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.config.setState(config); })