Skip to content

Commit

Permalink
refactor(@angular/ssr): use appRef.whenStable instead of util functio…
Browse files Browse the repository at this point in the history
…n from angular core

using application whenStable function instead of custom util function from angular core.
  • Loading branch information
sheikalthaf authored and clydin committed Nov 25, 2024
1 parent e01d329 commit 7ff9334
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/angular/ssr/src/routes/ng-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7ff9334

Please sign in to comment.