Packages

@angular/common

22.2.6 · 12 Nov 2026MIT8.1M / weekRepositoryHomepagenpmAtom feed

Your version

20.0.0

major28 May 2025Where it was published

20.3.35 is the newest release of 20.x.

In short

24 breaking4 deprecated

  • Breaking

    Using the Y formatter (week-numbering year) without also including w (week number) is now detected as suspicious date pattern, as y is typically intended.

  • Breaking

    AsyncPipe now directly catches unhandled errors in subscriptions and promises and reports them to the application's ErrorHandler. For Zone-based applications, these errors would have been caught by ZoneJS and reported to ErrorHandler so the result is generally the same. The change to the exact mechanism for reporting can result in differences in test environments that will require test updates.

  • Breaking

    'in' in an expression now refers to the operator

  • Breaking

    void in an expression now refers to the operator

  • Breaking

    Parenthesis are always respected.

  • Breaking

    TypeScript versions less than 5.8 are no longer supported.

  • Breaking

    The TestBed.flushEffects() was removed - use the TestBed.tick() instead.

  • Breaking

    It is renamed to provideCheckNoChangesConfig

Security

Release note

Blog post: blog.angular.dev/announcing-angular-v20-b5c9c06…

Breaking Changes

common

  • Breaking

    Using the Y formatter (week-numbering year) without also including w (week number) is now detected as suspicious date pattern, as y is typically intended.

  • Breaking

    AsyncPipe now directly catches unhandled errors in
    subscriptions and promises and reports them to the application's
    ErrorHandler. For Zone-based applications, these errors would have
    been caught by ZoneJS and reported to ErrorHandler so the result is
    generally the same. The change to the exact mechanism for reporting can
    result in differences in test environments that will require test
    updates.

compiler

  • Breaking

    'in' in an expression now refers to the operator

  • Breaking

    void in an expression now refers to the operator

    Previously an expression in the template like {{void}} referred to a
    property on the component class. After this change it now refers to the
    void operator, which would make the above example invalid. If you have
    existing expressions that need to refer to a property named void,
    change the expression to use this.void instead: {{this.void}}.

  • Breaking

    Parenthesis are always respected.

    This can lead to runtime breakages when a nullish coalescing operator is nested within parentheses.
    eg. {{ (foo?.bar).baz }} will throw if foo is nullish. This is the same behavior as native JavaScript.

core

  • Breaking

    TypeScript versions less than 5.8 are no longer supported.

  • Breaking

    The TestBed.flushEffects() was removed - use
    the TestBed.tick() instead.

  • Breaking

    provideExperimentalCheckNoChangesForDebug has several
    breaking changes:

    • It is renamed to provideCheckNoChangesConfig

    • The behavior applies to all checkNoChanges runs

    • The useNgZoneOnStable option is removed. This wasn't found to be generally
      more useful than interval

  • Breaking

    provideExperimentalZonelessChangeDetection is
    renamed to provideZonelessChangeDetection as it is now "Developer
    Preview" rather than "Experimental".

  • Breaking

    InjectFlags has been removed.

    • inject no longer accepts InjectFlags.

    • Injector.get no longer accepts InjectFlags.

    • EnvironmentInjector.get no longer accepts InjectFlags.

    • TestBed.get no longer accepts InjectFlags.

    • TestBed.inject no longer accepts InjectFlags.

  • Breaking

    TestBed.get has been removed. Use TestBed.inject instead.

  • Breaking

    afterRender was renamed to afterEveryRender.

  • Breaking

    Angular no longer supports Node.js v18.

    • Node.js versions 22.0 to 22.10 are also no longer supported.

    Before upgrading to Angular v20, ensure the Node.js version is at least 20.11.1.
    For the full list of supported versions, visit: angular.dev/reference/versions

  • Breaking

    PendingTasks.run no longer returns the result of the
    async function. If this behavior is desired, it can be re-implemented
    manually with the PendingTasks.add. Be aware, however, that promise rejections
    will need to be handled or they can cause the node process to shut down
    when using SSR.

  • Breaking

    Uncaught errors in listeners which were previously only reported to
    ErrorHandler are now also reported to Angular's internal error
    handling machinery. For tests, this means that the error will be
    rethrown by default rather than only logging the error. Developers
    should fix these errors, catch them in the test if the test is
    intentionally covering an error case, or use rethrowApplicationErrors: false in configureTestingModule as a last resort.

  • Breaking

    The any overload has been removed from
    injector.get. It now only supports ProviderToken<T> and (deprecated
    since v4) string.

  • Breaking

    Animations are guaranteed to be flushed when Angular
    runs automatic change detection or manual calls to ApplicationRef.tick.
    Prior to this change, animations would not be flushed in some situations
    if change detection did not run on any views attached to the
    application. This change can affect tests which may rely on the old
    behavior, often by making assertions on DOM elements that should have
    been removed but weren't because DOM removal is delayed until animations
    are flushed.

  • Breaking

    ApplicationRef.tick will no longer catch and report
    errors to the application ErrorHandler. Errors will instead be thrown out of
    the method and will allow callers to determine how to handle these
    errors, such as aborting follow-up work or reporting the error and
    continuing.

  • Breaking

    This commit deprecates ng-reflect-* attributes and updates the runtime to stop producing them by default. Please refactor application and test code to avoid relying on ng-reflect-* attributes.

    To enable a more seamless upgrade to v20, we've added the provideNgReflectAttributes() function (can be imported from the @angular/core package), which enables the mode in which Angular would be producing those attribites (in dev mode only). You can add the provideNgReflectAttributes() function to the list of providers within the bootstrap call.

router

  • Breaking

    The RedirectFn can now return Observable or
    Promise. Any code that directly calls functions returning this type
    may need to be adjusted to account for this.

  • Breaking

    Several methods in the public API of the Router which
    required writable arrays have now been updated to accept readonly
    arrays when no mutations are done.

  • Breaking

    The guards arrays on Route no longer include any in
    the type union. The union includes functions for the functional guards
    as well as a type matching Injector.get: ProviderToken<T>|string.
    Note that string is still deprecated on both the route guards and
    Injector.get.

Deprecations

core

  • Deprecated

    ngIf/ngFor/ngSwitch are deprecated. Use the control flow blocks instead (@for/@if/@switch).

platform-browser

platform-server

  • Deprecated

    @angular/platform-server/testing

    Use e2e tests to verify SSR behavior instead.

common

CommitTypeDescription
2e5362a469feataccept undefined inputs in NgTemplateOutlet (#61404)
b7d3f3dbfcfeatAllow passing ScrollOptions to ViewportScroller (#61002)
74cceba587featthrow error for suspicious date patterns (#59798)
255c79e048fixcleanup updateLatestValue if view is destroyed before promise resolves (#58041)
739cadae62fixHandle errors in async pipe subscriptions (#60057)
cbbea70fa3fixissue a warning instead of an error when NgOptimizedImage exceeds the preload limit (#60879)
fc4a56d5c5fixrename httpResource function in factory (#60022)
785a1110e6fixresolve host binding type issues (#60481)

compiler

CommitTypeDescription
7a971766dcfeatadd extended diagnostic for uninvoked track function on @for blocks (#60495)
f2d5cf7eddfeatsupport exponentiation operator in templates (#59894)
51b8ff23cefeatsupport tagged template literals in expressions (#59947)
1b8e7ab9fefeatsupport the in keyword in Binary expression (#58432)
0361c2d81ffeatsupport void operator in templates (#59894)
8b990a31c3fixerror if rawText isn't estimated correctly (#60529)
4fe489f1b4fixexponentiation should be right-to-left associative (#60101)
ef1fd137a9fixincorrect spans for template literals (#60323)
e0d378d20efixincorrectly handling let declarations inside i18n (#60512)
b70ad3c4e6fixproper handling of typeof, void in RecursiveAstVisitor (#60101)
e25e6c95a2fixremove TypeScript from linker (#61635)
768239a89cperfreduce allocations for let declarations only used in the same view (#60512)

compiler-cli

CommitTypeDescription
bec1610da2featadd extended diagnostic for invalid nullish coalescing (#60279)
c889382a20featdetect missing structural directive imports (#59443)
1971e57a45featsupport type checking of host bindings (#60267)
9ec9c7e1b8fixavoid fatal diagnostics for invalid module schemas (#61220)
a1cacc5b17fixavoid fatal diagnostics for missing template files (#58673)
1e6faad479fixcorrectly parse event name in HostListener (#60561)
ffb19e64f1fixpreserve required parens for nullish coalescing (#60060)
7c9b4892e9fixpreserve required parens in exponentiation expressions (#60101)
7e03af898efixset correct target when type checking events (#60561)
2d51a203dcfixwrong event name for host listener decorators (#60460)

core

CommitTypeDescription
22d3f0562cfeatadd hook for producer creation side effects (#60333)
fe57332fc5featadd input binding support to dynamically-created components (#60137)
65adb3024dfeatAdd provider which reports unhandled errors on window to ErrorHandler (#60704)
b154fb3911featadd support for two-way bindings on dynamically-created components (#60342)
82aa2c1a52featadd the ability to apply directives to dynamically-created components (#60137)
326d48afb4featdrop support for TypeScript older than 5.8 (#60197)
d260ca3091featemit template function for template related profiler hooks (#60174)
a4bad8d361featexport signalGetFn from signal primitives (#60497)
4812215a7bfeatExpose Injector.destroy on Injector created with Injector.create (#60054)
c1bcae91ddfeatexpose performance data in Chrome DevTools (#60789)
809b5b4596featintroduce new DI profiling event (#60158)
d5fd7349fbfeatintroduce TestBed.tick() (#60993)
4e88e18a8efeatmark toObservable as stable (#60449)
727cda3856featmark linkedSignal API as public (#60865)
644d9f3bbdfeatmark the toSignal API as stable (#60442)
e711f99d81featmove provideExperimentalCheckNoChangesForDebug to provideCheckNoChangesConfig (#60906)
7ccec1494ffeatmove DOCUMENT token into core (#60663)
953c4b2580featMove zoneless change detection to dev preview (#60748)
611baaf069featremove InjectFlags from public API (#60318)
5e209cb560featremove TestBed.get (#60414)
d8fbb909cefeatrename afterRender to afterEveryRender and stabilize (#60999)
567522398ffeatstabilize incremental hydration api (#60888)
8d050b5bfcfeatstabilize linkedSignal API (#60741)
866cea9a05featStabilize PendingTasks Injectable (#60716)
bf8492b871featstabilize withI18nSupport() api (#60889)
be44cc8f40featsupport listening to outputs on dynamically-created components (#60137)
fe9b79b615featupdate Node.js version support (#60545)
e170d24240fixadd migration away from InjectFlags (#60318)
7eb59d3887fixadded @angular/compiler as a peer dependency (#55610)
7232ce5b17fixCatch and report rejections in async function of PendingTasks.run (#60044)
fd12220a35fixdefer block render failures should report to application error handler (#60149)
3459faadbffixdo not allow setInput to be used with inputBinding (#60137)
0ac949c266fixdo not run change detection on global error events (#60944)
4fe34f4cfefixenable stashing only when withEventReplay() is invoked (#61077)
962b59b14efixEnsure ComponentFixture does not duplicate error reporting from FakeAsync (#60104)
7b819be83ffixEnsure errors in listeners report to the application error handler (#60251)
ff772d7800fixfix typing on injector.get to omit 'any' (#60202)
13d1c8ab38fixfixes timing of hydration cleanup on control flow (#60425)
0b69b61929fixFlush animations when no component has been checked (#58089)
3ba39bc28ffixgetting resource value throws an error instead of returning undefined (#61441)
ca6295e90bfixhandle different DI token types in Chrome DevTools integration (#61333)
0162ceb427fixinject migration should treat @Attribute as optional (#60916)
ea5eb28865fixinput targeting not checking if input exists on host (#60137)
c8951159acfixmark zone.js as an optional peer dependency (#61616)
d62379bb13fixmove reload method from Resource to WritableResource (#61441)
a89f1cff24fixnarrow error type for resources API (#61441)
624be2ef0cfixprevent stash listener conflicts (#59635)
017cc0a37cfixproperly handle app stabilization with defer blocks (#61040)
6e79eaf739fixreading resource value after reload in the error state (#61441)
3d85d9363cfixreduce total memory usage of various migration schematics (#60774)
1c7b356625fixrelease hasPendingTasks observers (#59723)
43cbc58254fixremove forceRoot flag for effects (#60535)
48974c3cf8fixremove rejectErrors option encourages uncaught exceptions (#60397)
491b0a4eadfixRemove duplicate reporting of errors in CDR.detectChanges (#60056)
04d963c0a5fixremove unused parameter from listener instruction (#60406)
0ae1889560fixrun ApplicationRef.prototype.bootstrap in NgZone (#60720)
a611b234d7fixrun root effects in creation order (#60534)
338818ce89fixSurface errors from ApplicationRef.tick to callsite (#60102)
350776b412fixTestBed.tick should ensure test components are synchronized (#61382)
3d4ddd2247fixTesting should not throw when Zone does not patch test FW APIs (#61628)
30e081287dfixupdate min Node.js support to 20.19, 22.12, and 24.0 (#61500)
b407157ee8refactorDeprecate the structural directives ngIf/ngFor/ngSwitch. (#60492)
c2987d8402refactorstop producing ng-reflect attributes by default (#60973)

forms

CommitTypeDescription
a07ee60989featadd markAllAsDirty to AbstractControl (#58663)
bdfbd54932featAllow to reset a form without emitting events (#60354)
81fe0536fdfixMake sure statusChanges is emitted (#57098)
bdd5e20423fixresolve host binding type issues (#60481)

http

CommitTypeDescription
ccc5cc068ffeatadd keepalive support for fetch requests (#60621)
5795e03cdffixDelay stabilization until next app synchronization (#60656)

platform-browser

CommitTypeDescription
bc2cab747frefactorDeprecate the platform-browser-dynamic package (#61043)
a980ac9a6arefactorDeprecate the HammerJS integration (#60257)

platform-server

CommitTypeDescription
2240a21c97refactordeprecate the testing entry point (#60915)

router

CommitTypeDescription
0bb4bd661efeatAdd ability to directly abort a navigation (#60380)
62de7d930afeatadd asynchronous redirects (#60863)
7c12cb1df9featAllow resolvers to read resolved data from ancestors (#59860)
ff98ccb193featsupport custom elements for RouterLink (#60290)
219f41d049fixPrevent dangling promise rejections from internal navigations (#60162)
2419060feffixrelax required types on router commands to readonly array (#60345)
c57951d58ffixRemove 'any' type from route guards (#60378)
db2f2d99c8fixScroller should scroll as soon as change detection completes (#60086)

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.