From 5ac03f40e720b47bdd29aad4a685c2a13dbb537c Mon Sep 17 00:00:00 2001 From: Sheik Althaf Date: Sat, 23 Nov 2024 13:53:09 +0530 Subject: [PATCH] refactor(@angular/ssr): use appRef.whenStable instead of util function from angular core using application whenStable function instead of custom util function from angular core. (cherry picked from commit 7ff933423c2c55be0a4be7d5c805a57698f576d3) --- packages/angular/ssr/src/routes/ng-routes.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/angular/ssr/src/routes/ng-routes.ts b/packages/angular/ssr/src/routes/ng-routes.ts index bf74c60112a4..8ac0561af294 100644 --- a/packages/angular/ssr/src/routes/ng-routes.ts +++ b/packages/angular/ssr/src/routes/ng-routes.ts @@ -7,14 +7,7 @@ */ import { APP_BASE_HREF, PlatformLocation } from '@angular/common'; -import { - ApplicationRef, - Compiler, - Injector, - runInInjectionContext, - ɵwhenStable as whenStable, - ɵConsole, -} from '@angular/core'; +import { ApplicationRef, Compiler, Injector, runInInjectionContext, ɵConsole } from '@angular/core'; import { INITIAL_CONFIG, platformServer } from '@angular/platform-server'; import { Route, Router, ɵloadChildren as loadChildrenHelper } from '@angular/router'; import { ServerAssets } from '../assets'; @@ -432,7 +425,7 @@ export async function getRoutesFromAngularRouterConfig( } // Wait until the application is stable. - await whenStable(applicationRef); + await applicationRef.whenStable(); const injector = applicationRef.injector; const router = injector.get(Router);