Skip to content

Commit 5c61f46

Browse files
alan-agius4AndrewKushnir
authored andcommitted
refactor(platform-browser): remove deprecated BrowserModule.withServerTransition method (angular#58062)
BREAKING CHANGE: The deprecated `BrowserModule.withServerTransition` method has been removed. Please use the `APP_ID` DI token to set the application id instead. PR Close angular#58062
1 parent 109366e commit 5c61f46

2 files changed

Lines changed: 0 additions & 22 deletions

File tree

goldens/public-api/platform-browser/index.api.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { HttpTransferCacheOptions } from '@angular/common/http';
1414
import * as i0 from '@angular/core';
1515
import * as i1 from '@angular/common';
1616
import { InjectionToken } from '@angular/core';
17-
import { ModuleWithProviders } from '@angular/core';
1817
import { NgZone } from '@angular/core';
1918
import { PlatformRef } from '@angular/core';
2019
import { Predicate } from '@angular/core';
@@ -34,10 +33,6 @@ export function bootstrapApplication(rootComponent: Type<unknown>, options?: App
3433
// @public
3534
export class BrowserModule {
3635
constructor(providersAlreadyPresent: boolean | null);
37-
// @deprecated
38-
static withServerTransition(params: {
39-
appId: string;
40-
}): ModuleWithProviders<BrowserModule>;
4136
// (undocumented)
4237
static ɵfac: i0.ɵɵFactoryDeclaration<BrowserModule, [{ optional: true; skipSelf: true; }]>;
4338
// (undocumented)

packages/platform-browser/src/browser.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -278,21 +278,4 @@ export class BrowserModule {
278278
);
279279
}
280280
}
281-
282-
/**
283-
* Configures a browser-based app to transition from a server-rendered app, if
284-
* one is present on the page.
285-
*
286-
* @param params An object containing an identifier for the app to transition.
287-
* The ID must match between the client and server versions of the app.
288-
* @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.
289-
*
290-
* @deprecated Use {@link APP_ID} instead to set the application ID.
291-
*/
292-
static withServerTransition(params: {appId: string}): ModuleWithProviders<BrowserModule> {
293-
return {
294-
ngModule: BrowserModule,
295-
providers: [{provide: APP_ID, useValue: params.appId}],
296-
};
297-
}
298281
}

0 commit comments

Comments
 (0)