Skip to content

Upgrading @angular/platform-browser-dynamic 11 to 12

Breaking11.2.14 → 12.2.17Breaking17Security1Platform61Deprecated1New52Changed19Fixed172Other15

BreakingUpgrade verdict

17 breaking changes and 25 platform requirement changes and a security fix.

  • Linked libraries no longer generate legacy i18n message ids; migrate ids with the localize-migrate tool.
  • Drops support for Node v10.
  • The published packages no longer ship minified UMD bundles.
  • Elements are now properly removed when the root view is destroyed; SSR users must save the app HTML before destroying the app.
Top 5 of 44 that need code or config changes

Requires Node.js ^12.14.1 || >=14.0.0 from 12.1.0-next.3 (none stated before).

Breaking17
Linked libraries no longer generate legacy i18n message ids; migrate ids with the localize-migrate tool.
localize-migrate
Drops support for Node v10.
Removes minified UMD bundles from the distributed NPM packages.
Removes DOM elements correctly when the root view is removed in animations.
PlatformLocation onPopState and onHashChange now return functions that remove event handlers instead of void.
PlatformLocationonPopStateonHashChange
Linked libraries no longer generate legacy i18n message ids.
localize-migrate
Changes default of emitDistinctChangesOnlyDefaultValue to true and deprecates emitDistinctChangesOnly.
emitDistinctChangesOnlyDefaultValueemitDistinctChangesOnlyQueryList.changes@ContentChildren@ViewChildren
Hardens attribute and property binding rules for iframe elements, which may require updates to existing iframe usages.
<iframe>
ng.getDirectives now returns an empty array for DOM nodes without Angular context instead of throwing.
ng.getDirectives
HttpParams methods now accept string | number | boolean instead of string for parameter values.
HttpParams
ng.getDirectives now returns an empty array for DOM nodes without Angular context instead of throwing.
ng.getDirectives
Changes APP_INITIALIZER token type to Promise<unknown> | Observable<unknown> | void.
APP_INITIALIZERInjector.getTestBed.injectProvider
FormArray.removeAt, setControl and clear now accept new options, so subclasses overriding them may need type-compatible updates.
FormArray.removeAtFormArray.setControlFormArray.clearFormArrayFormGroup
min and max attributes on number inputs now trigger min/max validation when a form directive is present.
minmaxformControlformControlNamengModel
XhrFactory moves from @angular/common/http to @angular/common, so imports must be updated.
XhrFactory
Router strict null checks now report fragments that may be null, requiring a null check.
RouterLinkActive.routerLinkActiveOptions input type is expanded, so code reading it may need updating.
RouterLinkActive.routerLinkActiveOptions
Security1
Hardens attribute and property binding rules for <iframe> elements.
<iframe>
Platform25
Adds support for TypeScript 4.3.
Restricts the supported Node.js range for compiler to LTS versions only.
Updates the supported range of Node versions for the language service.
Restricts the language service's supported Node versions to LTS releases only.
Updates the supported range of Node versions for animations to only include LTS versions.
Updates the supported Node.js version range for platform-browser-dynamic to only include LTS versions.
Updates the supported Node.js version range for animations.
Updates the supported Node.js version range for bazel.
Updates the supported Node.js version range for common.
Updates the supported Node.js version range for compiler.
Updates the supported Node.js version range for compiler-cli.
Updates the supported range of Node.js versions for core.
Drops support for TypeScript 4.0 and 4.1.
Adds support for TypeScript 4.2.
Updates the supported range of Node.js versions for elements.
Updates the supported range of Node.js versions for forms.
Updates the supported range of Node.js versions for the language service.
Updates the supported range of Node versions for localize.
Updates the supported range of Node versions for platform-browser.
Updates the supported range of Node versions for platform-browser-dynamic.
Updates the supported range of Node versions for platform-server.
Updates the supported range of Node versions for router.
Updates the supported range of Node versions for service-worker.
Updates the supported range of Node versions for upgrade.
Drops support for Node v10.
Deprecated1
Temporarily re-exports and deprecates XhrFactory.
XhrFactory

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • added: method ɵDOMTestComponentRenderer.removeAllRootElements(): void