From c0eae287283da133d8303a636f1154a69ef9dfe9 Mon Sep 17 00:00:00 2001 From: sumeyye Date: Tue, 3 Jun 2025 12:03:01 +0300 Subject: [PATCH] update: environment page for the standalone migration --- docs/en/framework/ui/angular/environment.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/en/framework/ui/angular/environment.md b/docs/en/framework/ui/angular/environment.md index 7fd1b1273a..edf31e7439 100644 --- a/docs/en/framework/ui/angular/environment.md +++ b/docs/en/framework/ui/angular/environment.md @@ -111,12 +111,16 @@ import { environment } from '../environments/environment'; @NgModule({ imports: [ //...other imports - CoreModule.forRoot({ - environment - }), + provideAbpCore( + withOptions({ + environment + }) + ), + ] }) ``` + ## EnvironmentService ` EnvironmentService` is a singleton service, i.e. provided in root level of your application, and keeps the environment in the internal store. @@ -132,7 +136,7 @@ import { EnvironmentService } from '@abp/ng.core'; /* class metadata here */ }) class DemoComponent { - constructor(private environment: EnvironmentService) {} + private environment = inject(EnvironmentService); } ```