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