Skip to content

Commit

Permalink
refactor(platform-browser): remove deprecated `BrowserTransferStateMo…
Browse files Browse the repository at this point in the history
…dule` symbol (#49718)

The `TransferState` class was updated in v14 in a way that the `BrowserTransferStateModule` was no longer required. The `BrowserTransferStateModule` was deprecated in v14.1 and it's currently empty. This commit removes the `BrowserTransferStateModule`.

BREAKING CHANGE: The deprecated `BrowserTransferStateModule` was removed, since it's no longer needed. The `TransferState` class can be injected without providing the module. The `BrowserTransferStateModule` was empty starting from v14 and you can just remove the reference to that module from your applications.

PR Close #49718
  • Loading branch information
JeanMeche authored and dylhunn committed Apr 5, 2023
1 parent dc9651b commit 9bd9a11
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 34 deletions.
2 changes: 0 additions & 2 deletions aio/content/guide/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ v16 - v19
| `@angular/core` | [`ComponentFactory`](#core) | v13 | v16 |
| `@angular/core` | [`ComponentFactoryResolver`](#core) | v13 | v16 |
| `@angular/core` | [`CompilerOptions.useJit and CompilerOptions.missingTranslation config options`](#core) | v13 | v16 |
| `@angular/platform-browser` | [`BrowserTransferStateModule`](#platform-browser) | v14 | v16 |
| `@angular/platform-browser-dynamic` | [`JitCompilerFactory`](#platform-browser-dynamic) | v13 | v16 |
| `@angular/platform-browser-dynamic` | [`RESOURCE_CACHE_PROVIDER`](#platform-browser-dynamic) | v13 | v16 |
| `@angular/platform-server` | [`ServerTransferStateModule`](#platform-server) | v14 | v16 |
Expand Down Expand Up @@ -205,7 +204,6 @@ In the [API reference section](api) of this site, deprecated APIs are indicated

| API | Replacement | Deprecation announced | Details |
|:--- |:--- |:--- |:--- |
| [`BrowserTransferStateModule`](api/platform-browser/BrowserTransferStateModule) | No replacement needed. | v14.1 | The `TransferState` class is available for injection without importing additional modules on the client side of a server-rendered application. |
| [`BrowserModule.withServerTransition`](api/platform-browser/BrowserModule#withservertransition) | No replacement needed. | v16.0 | The `APP_ID`token should be used instead to set the application ID. |
| `makeStateKey`, `StateKey` and `TransferState` | Import from `@angular/core`. | v16.0 | Same behavior, but exported from a different package. |
<a id="platform-browser-dynamic"></a>
Expand Down
10 changes: 0 additions & 10 deletions goldens/public-api/platform-browser/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ export class BrowserModule {
static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserModule, never, never, [typeof i1.CommonModule, typeof i0.ApplicationModule]>;
}

// @public @deprecated
export class BrowserTransferStateModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<BrowserTransferStateModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<BrowserTransferStateModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserTransferStateModule, never, never, never>;
}

// @public
export class By {
static all(): Predicate<DebugNode>;
Expand Down
21 changes: 0 additions & 21 deletions packages/platform-browser/src/browser/transfer_state_module.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/platform-browser/src/platform-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export {ApplicationConfig, bootstrapApplication, BrowserModule, createApplicatio
export {Meta, MetaDefinition} from './browser/meta';
export {Title} from './browser/title';
export {disableDebugTools, enableDebugTools} from './browser/tools/tools';
export {BrowserTransferStateModule} from './browser/transfer_state_module';
export {By} from './dom/debug/by';
export {REMOVE_STYLES_ON_COMPONENT_DESTROY} from './dom/dom_renderer';
export {EVENT_MANAGER_PLUGINS, EventManager} from './dom/events/event_manager';
Expand Down

0 comments on commit 9bd9a11

Please sign in to comment.