Upgrading @angular/platform-browser-dynamic 16 to 17
Breaking16.2.12 → 17.3.12Breaking23Platform7Deprecated9New75Changed26Fixed321Other3
BreakingUpgrade verdict
19 breaking changes and 6 platform requirement changes.
In plain terms
- The mutate method is gone; use update with immutable changes instead.
- Two old compiler options that were already deprecated are gone.
- The mutate function is no longer part of the public signals API.
- The withNoDomReuse function has been removed from the API.
Must act Top 5 of 33 that need code or config changes
Node.js requirement changed in 17.0.0-rc.2: ^16.14.0 || >=18.10.0 → ^18.13.0 || >=20.9.0.
What you must change
Breaking19
Removes the
mutate method from the WritableSignal interface and public API.WritableSignalmutateupdateRemoves deprecated CompilerOptions.useJit and CompilerOptions.missingTranslation.
CompilerOptions.useJitCompilerOptions.missingTranslationDrops the mutate function from the signals public API.
mutateRemoves the
withNoDomReuse function.withNoDomReuseRemoves
urlHandlingStrategy from public Router properties.RouterurlHandlingStrategyRemoves deprecated Router properties.
RouterRemoves the deprecated
setupTestingRouter function.setupTestingRouterRemoves
malformedUriErrorHandler from ExtraOptions.ExtraOptionsmalformedUriErrorHandlerNgSwitch now defaults to the === equality operator instead of ==.
NgSwitchREMOVE_STYLES_ON_COMPONENT_DESTROY now defaults to true, removing component CSS from the DOM on destroy.
REMOVE_STYLES_ON_COMPONENT_DESTROYRemoves the withNoDomReuse() function from the public API.
withNoDomReuse()provideClientHydration()ngSkipHydrationAbsolute redirects no longer prevent further redirects, so route configs may need adjustment to avoid infinite redirects.
Routes with loadComponent no longer cause child routes to inherit parent data by default.
loadComponentparamsInheritanceStrategyRemoves urlHandlingStrategy from the Router public API; configure it via provideRouter or RouterModule.forRoot.
urlHandlingStrategyprovideRouterRouterModule.forRootRemoves canceledNavigationResolution, paramsInheritanceStrategy, titleStrategy, urlUpdateStrategy and malformedUriErrorHandler from the Router public API.
canceledNavigationResolutionparamsInheritanceStrategytitleStrategyurlUpdateStrategymalformedUriErrorHandlerprovideRouterRouterModule.forRootmalformedUriErrorHandler is no longer available in RouterModule.forRoot options; handle URL parse errors in UrlSerializer.parse.
malformedUriErrorHandlerRouterModule.forRootUrlSerializer.parseDynamically created OnPush components now refresh host bindings and run ngDoCheck only when dirty.
OnPushngDoCheckComponentRefmarkForCheckdetectChangesChangeDetectorRefRemoves the setupTestingRouter function; use RouterModule.forRoot or provideRouter to set up the Router for tests.
setupTestingRouterRouterModule.forRootprovideRouterRouterDisallows deep and legacy zone.js dist/ imports; zone-testing-bundle and zone-testing-node-bundle are removed from the package.
zone.jszone.js/testingzone-testing-bundlezone-testing-node-bundlePlatform6
Adds support for TypeScript 5.4.
Removes support for Node.js v16.
Drops support for older TypeScript versions.
TypeScriptSupports TypeScript 5.2.
Removes Node.js v16 support and bumps the minimum to 18.13.0.
Versions of TypeScript older than 5.2 are no longer supported.
TypeScriptDeprecations to plan for
Deprecated8
Deprecates AnimationDriver.NOOP.
AnimationDriver.NOOPDeprecates swapping out the context object for EmbeddedViewRef and warns on the deprecated NgProbeToken.
EmbeddedViewRefObject.assignProxyNgTemplateOutletNgProbeTokenDeprecates ChangeDetectorRef.checkNoChanges.
ChangeDetectorRef.checkNoChangesDeprecates allowing the full context object to be replaced in EmbeddedViewRef.
EmbeddedViewRefDeprecates NgProbeToken.
NgProbeTokenDeprecates the AnimationDriver.NOOP symbol in favor of NoopAnimationDriver.
AnimationDriver.NOOPNoopAnimationDriverDeprecates ChangeDetectorRef.checkNoChanges; tests should use ComponentFixture instead.
ChangeDetectorRef.checkNoChangesComponentFixtureChangeDetectorRefDeprecates
ChangeDetectorRef.checkNoChanges.ChangeDetectorRef.checkNoChanges