Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions packages/angular/ssr/src/routes/ng-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,11 @@ import {
ApplicationRef,
Compiler,
Injector,
createPlatformFactory,
platformCore,
runInInjectionContext,
ɵwhenStable as whenStable,
ɵConsole,
} from '@angular/core';
import {
INITIAL_CONFIG,
ɵINTERNAL_SERVER_PLATFORM_PROVIDERS as INTERNAL_SERVER_PLATFORM_PROVIDERS,
} from '@angular/platform-server';
import { INITIAL_CONFIG, platformServer } from '@angular/platform-server';
import { Route, Router, ɵloadChildren as loadChildrenHelper } from '@angular/router';
import { ServerAssets } from '../assets';
import { Console } from '../console';
Expand Down Expand Up @@ -377,7 +372,7 @@ export async function getRoutesFromAngularRouterConfig(
const { protocol, host } = url;

// Create and initialize the Angular platform for server-side rendering.
const platformRef = createPlatformFactory(platformCore, 'server', [
const platformRef = platformServer([
{
provide: INITIAL_CONFIG,
useValue: { document, url: `${protocol}//${host}/` },
Expand All @@ -386,8 +381,7 @@ export async function getRoutesFromAngularRouterConfig(
provide: ɵConsole,
useFactory: () => new Console(),
},
...INTERNAL_SERVER_PLATFORM_PROVIDERS,
])();
]);

try {
let applicationRef: ApplicationRef;
Expand Down