Skip to content

Upgrading @angular/platform-browser-dynamic 16 to 17

Breaking16.2.12 → 17.3.12Breaking23Platform7Deprecated9New75Changed26Fixed321Other3

BreakingUpgrade verdict

19 breaking changes and 6 platform requirement changes.

  • 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.
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.

Breaking19
Removes the mutate method from the WritableSignal interface and public API.
WritableSignalmutateupdate
Removes deprecated CompilerOptions.useJit and CompilerOptions.missingTranslation.
CompilerOptions.useJitCompilerOptions.missingTranslation
Drops the mutate function from the signals public API.
mutate
Removes the withNoDomReuse function.
withNoDomReuse
Removes urlHandlingStrategy from public Router properties.
RouterurlHandlingStrategy
Removes deprecated Router properties.
Router
Removes the deprecated setupTestingRouter function.
setupTestingRouter
Removes malformedUriErrorHandler from ExtraOptions.
ExtraOptionsmalformedUriErrorHandler
NgSwitch now defaults to the === equality operator instead of ==.
NgSwitch
REMOVE_STYLES_ON_COMPONENT_DESTROY now defaults to true, removing component CSS from the DOM on destroy.
REMOVE_STYLES_ON_COMPONENT_DESTROY
Removes the withNoDomReuse() function from the public API.
withNoDomReuse()provideClientHydration()ngSkipHydration
Absolute 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.
loadComponentparamsInheritanceStrategy
Removes urlHandlingStrategy from the Router public API; configure it via provideRouter or RouterModule.forRoot.
urlHandlingStrategyprovideRouterRouterModule.forRoot
Removes canceledNavigationResolution, paramsInheritanceStrategy, titleStrategy, urlUpdateStrategy and malformedUriErrorHandler from the Router public API.
canceledNavigationResolutionparamsInheritanceStrategytitleStrategyurlUpdateStrategymalformedUriErrorHandlerprovideRouterRouterModule.forRoot
malformedUriErrorHandler is no longer available in RouterModule.forRoot options; handle URL parse errors in UrlSerializer.parse.
malformedUriErrorHandlerRouterModule.forRootUrlSerializer.parse
Dynamically created OnPush components now refresh host bindings and run ngDoCheck only when dirty.
OnPushngDoCheckComponentRefmarkForCheckdetectChangesChangeDetectorRef
Removes the setupTestingRouter function; use RouterModule.forRoot or provideRouter to set up the Router for tests.
setupTestingRouterRouterModule.forRootprovideRouterRouter
Disallows 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-bundle
Platform6
Adds support for TypeScript 5.4.
Removes support for Node.js v16.
Drops support for older TypeScript versions.
TypeScript
Supports 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.
TypeScript
Deprecated8
Deprecates AnimationDriver.NOOP.
AnimationDriver.NOOP
Deprecates swapping out the context object for EmbeddedViewRef and warns on the deprecated NgProbeToken.
EmbeddedViewRefObject.assignProxyNgTemplateOutletNgProbeToken
Deprecates ChangeDetectorRef.checkNoChanges.
ChangeDetectorRef.checkNoChanges
Deprecates allowing the full context object to be replaced in EmbeddedViewRef.
EmbeddedViewRef
Deprecates NgProbeToken.
NgProbeToken
Deprecates the AnimationDriver.NOOP symbol in favor of NoopAnimationDriver.
AnimationDriver.NOOPNoopAnimationDriver
Deprecates ChangeDetectorRef.checkNoChanges; tests should use ComponentFixture instead.
ChangeDetectorRef.checkNoChangesComponentFixtureChangeDetectorRef
Deprecates ChangeDetectorRef.checkNoChanges.
ChangeDetectorRef.checkNoChanges