Packages

@angular/common

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

Your version

19.0.0

major19 Nov 2024Where it was published

19.2.25 is the newest release of 19.x.

In short

14 breaking2 fixed2 changed

  • Breaking

    this.foo property reads no longer refer to template context variables. If you intended to read the template variable, do not use this..

  • Breaking

    Changes to CSS selectors parsing where introduced, mainly to: pseudo selectors :where() and :is(), parsing of :host and host-context, parsing selectors within pseudo selector arguments (for instance comma separated selectors). These changes could lead to a different specificity of the resulting selectors and/or previously broken selectors being applied now, for example :where(:host) used to transform to :where()[ng-host] and is being :where([ng-host]) now. Unlike the previous outcome, the new result can target elements and therefore could lead to breakages.

  • Breaking

    Angular directives, components and pipes are now standalone by default.

  • Breaking

    TypeScript versions less than 5.5 are no longer supported.

  • Breaking

    ExperimentalPendingTasks has been renamed to PendingTasks.

  • Breaking

    The autoDetect feature of ComponentFixture will now attach the fixture to the ApplicationRef. As a result, errors during automatic change detection of the fixture be reported to the ErrorHandler. This change may cause custom error handlers to observe new failures that were previously unreported.

  • Breaking

    createComponent will now render default fallback with empty projectableNodes.

  • Breaking

    The timers that are used for zone coalescing and hybrid mode scheduling (which schedules an application state synchronization when changes happen outside the Angular zone) will now run in the zone above Angular rather than the root zone. This will mostly affect tests which use fakeAsync: these timers will now be visible to fakeAsync and can be affected by tick or flush.

Security

Release note

Blog post: blog.angular.dev/meet-angular-v19-7b29dfd05b84

Breaking Changes

compiler

  • Breaking

    this.foo property reads no longer refer to template context variables. If you intended to read the template variable, do not use this..

  • Breaking

    Changes to CSS selectors parsing where introduced, mainly to: pseudo selectors :where() and :is(),
    parsing of :host and host-context, parsing selectors within pseudo selector arguments (for instance comma separated selectors).
    These changes could lead to a different specificity of the resulting selectors and/or previously broken selectors being applied now,
    for example :where(:host) used to transform to :where()[ng-host] and is being :where([ng-host]) now. Unlike the previous outcome,
    the new result can target elements and therefore could lead to breakages.

core

  • Breaking

    Angular directives, components and pipes are now standalone by default.

    • Specify standalone: false for declarations that are currently declared in @NgModules.

    • ng update for v19 will take care of this automatically.

  • Breaking

    TypeScript versions less than 5.5 are no longer supported.

  • Breaking

    Timing changes for effect API (in developer preview):

    • effects which are triggered outside of change detection run as part of
      the change detection process instead of as a microtask. Depending on the
      specifics of application/test setup, this can result in them executing
      earlier or later (or requiring additional test steps to trigger; see below
      examples).

    • effects which are triggered during change detection (e.g. by input
      signals) run earlier, before the component's template.

  • Breaking

    ExperimentalPendingTasks has been renamed to PendingTasks.

  • Breaking

    The autoDetect feature of ComponentFixture will now
    attach the fixture to the ApplicationRef. As a result, errors during
    automatic change detection of the fixture be reported to the ErrorHandler.
    This change may cause custom error handlers to observe new failures that were previously unreported.

  • Breaking

    createComponent will now render default fallback with empty projectableNodes.

    • When passing an empty array to projectableNodes in the createComponent API, the default fallback content
      of the ng-content will be rendered if present. To prevent rendering the default content, pass document.createTextNode('') as a projectableNode.

    // The first ng-content will render the default fallback content if present
    createComponent(MyComponent. { projectableNodes: [[], [secondNode]] });
    
    // To prevent projecting the default fallback content:
    createComponent(MyComponent. { projectableNodes: [[document.createTextNode('')], [secondNode]] });
    
    
  • Breaking

    Errors that are thrown during ApplicationRef.tick
    will now be rethrown when using TestBed. These errors should be
    resolved by ensuring the test environment is set up correctly to
    complete change detection successfully. There are two alternatives to
    catch the errors:

    • Instead of waiting for automatic change detection to happen, trigger
      it synchronously and expect the error. For example, a jasmine test
      could write expect(() => TestBed.inject(ApplicationRef).tick()).toThrow()

    • TestBed will reject any outstanding ComponentFixture.whenStable promises. A jasmine test,
      for example, could write expectAsync(fixture.whenStable()).toBeRejected().

    As a last resort, you can configure errors to not be rethrown by
    setting rethrowApplicationErrors to false in TestBed.configureTestingModule.

  • Breaking

    The timers that are used for zone coalescing and hybrid
    mode scheduling (which schedules an application state synchronization
    when changes happen outside the Angular zone) will now run in the zone
    above Angular rather than the root zone. This will mostly affect tests
    which use fakeAsync: these timers will now be visible to fakeAsync
    and can be affected by tick or flush.

  • Breaking

    The deprecated factories property in KeyValueDiffers has been removed.

elements

  • Breaking

    As part of switching away from custom CD behavior to the
    hybrid scheduler, timing of change detection around custom elements has
    changed subtly. These changes make elements more efficient, but can cause
    tests which encoded assumptions about how or when elements would be checked
    to require updating.

localize

  • Breaking

    The name option in the ng add @localize``schematic has been removed in favor of theproject option.

platform-browser

  • Breaking

    The deprecated BrowserModule.withServerTransition method has been removed. Please use the APP_ID DI token to set the application id instead.

router

  • Breaking

    The Router.errorHandler property has been removed.
    Adding an error handler should be configured in either
    withNavigationErrorHandler with provideRouter or the errorHandler
    property in the extra options of RouterModule.forRoot. In addition,
    the error handler cannot be used to change the return value of the
    router navigation promise or prevent it from rejecting. Instead, if you
    want to prevent the promise from rejecting, use resolveNavigationPromiseOnError.

  • Breaking

    The return type of the Resolve interface now includes
    RedirectCommand.

common

CommitTypeDescription
24c6373820featadd optional rounded transform support in cloudinary image loader (#55364)
50f08e6c4bfeatautomatically use sizes auto in NgOptimizedImage (#57479)
13c13067bcfeatdisable keyvalue sorting using null compareFn (#57487)

compiler

CommitTypeDescription
a2e4ee0cb3featadd diagnostic for unused standalone imports (#57605)
0c9d721ac1featadd support for the typeof keyword in template expressions. (#58183)
09f589f000fixthis.a should always refer to class property a (#55183)
98804fd4befixadd more specific matcher for hydrate never block (#58360)
b25121ee4afixavoid having to duplicate core environment (#58444)
560282aa9bfixcontrol flow nodes with root at the end projected incorrectly (#58607)
2be161d015fixfix :host parsing in pseudo-selectors (#58681)
806a61b5a6fixfix multiline selectors (#58681)
a3cb530d84fixhandle typeof expressions in serializer (#58217)
ba4340875afixignore placeholder-only i18n messages (#58154)
e5d3abb298fixresolve :host:host-context(.foo) (#58681)
80f56954cefixtransform chained pseudo-selectors (#58681)

compiler-cli

CommitTypeDescription
d9687f43ddfeat'strictStandalone' flag enforces standalone (#57935)
9e87593055featensure template style elements are preprocessed as inline styles (#57429)
231e6ff6cafeatgenerate the HMR replacement module (#58205)
dbe612f2cdfixdisable standalone by default on older versions of Angular (#58405)
d4d76ead80fixdo not fail fatal when references to non-existent module are discovered (#58515)
33fe252c58fixdo not report unused declarations coming from an imported array (#57940)
fb44323c51fixincorrectly generating relative file paths on case-insensitive platforms (#58150)
22cd6869effixmake the unused imports diagnostic easier to read (#58468)
9bbb01c85efixreport individual diagnostics for unused imports (#58589)
4716c3b966perfreduce duplicate component style resolution (#57502)

core

CommitTypeDescription
6ea8e1e9aafeatAdd a schematics to migrate to standalone: false. (#57643)
3ebe6b4ad4featAdd async run method on ExperimentalPendingTasks (#56546)
69fc5ae922featAdd incremental hydration public api (#58249)
8ebbae88cafeatAdd rxjs operator prevent app stability until an event (#56533)
19edf2c057featadd syntactic sugar for initializers (#53152)
c93b510f9bfeatallow passing undefined without needing to include it in the type argument of input (#57621)
ab25a192bafeatallow running output migration on a subset of paths (#58299)
fc59e2a7b7featchange effect() execution timing & no-op allowSignalWrites (#57874)
8bcc663a53featdrop support for TypeScript 5.4 (#57577)
18d8d44b1ffeatexperimental resource() API for async dependencies (#58255)
9762b24b5efeatexperimental impl of rxResource() (#58255)
6b8c494d05featflipping the default value for standalone to true (#58169)
e6e5d29e83featinitial version of the output migration (#57604)
be2e49639bfeatintroduce afterRenderEffect (#57549)
ec386e7f12featintroduce debugName optional arg to framework signal functions (#57073)
8311f00faafeatintroduce the reactive linkedSignal (#58189)
1b1519224dfeatmark input, output and model APIs as stable (#57804)
a7eff3ffaafeatmark signal-based query APIs as stable (#57921)
a1f229850afeatmigrate ExperimentalPendingTasks to PendingTasks (#57533)
3f1e7ab6aefeatpromote outputFromObservable & outputToObservable to stable. (#58214)
97c44a1d6cfeatPromote takeUntilDestroyed to stable. (#58200)
e5adf92965featstabilize @let syntax (#57813)
b063468027featsupport TypeScript 5.6 (#57424)
819ff034cefeattreat directives, pipes, components as by default (#58229)
ee426c62f0fixallow signal write error (#57973)
c095679f92fixavoid breaking change with apps using rxjs 6.x (#58341)
71ee81af2cfixclean up event contract once hydration is done (#58174)
f03d274e87fixComponentFixture autoDetect feature works like production (#55228)
950a5540f1fixEnsure the ViewContext is retained after closure minification (#57903)
7b1e5be20bfixfallback to default ng-content with empty projectable nodes. (#57480)
0300dd2e18fixFix fixture.detectChanges with autoDetect disabled and zoneless (#57416)
5fe57d4fbbfixfixes issues with control flow and incremental hydration (#58644)
51933ef5a6fixprevent errors on contract cleanup (#58614)
fd7716440bfixPrevents trying to trigger incremental hydration on CSR (#58366)
656b5d3e78fixRe-assign error codes to be within core bounds (<1000) (#53455)
6e0af6dbbbfixresolve forward-referenced host directives during directive matching (#58492)
468d3fb9b1fixrethrow errors during ApplicationRef.tick in TestBed (#57200)
226a67dabbfixSchedulers run in zone above Angular rather than root (#57553)
97fb86d331perfset encapsulation to None for empty component styles (#57130)
c15ec36bd1refactorremove deprecated factories Property in KeyValueDiffers (#58064)

elements

CommitTypeDescription
fe5c4e086afixsupport output()-shaped outputs (#57535)
0cebfd7462fixswitch to ComponentRef.setInput & remove custom scheduler (#56728)

forms

CommitTypeDescription
3e7d724037featadd ability to clear a FormRecord (#50750)
18b6f3339ffixfix FormRecord type inference (#50750)

http

CommitTypeDescription
4b9accdf16featpromote withRequestsMadeViaParent to stable. (#58221)
057cf7fb6bfixpreserve all headers from Headers object (#57802)

language-service

CommitTypeDescription
8da9fb49b5featadd code fix for unused standalone imports (#57605)
1f067f4507featadd code reactoring action to migrate @Input to signal-input (#57214)
56ee47f2ecfeatallow code refactorings to compute edits asynchronously (#57214)
bc83fc1e2efeatsupport converting to signal queries in VSCode extension (#58106)
5c4305f024featsupport migrating full classes to signal inputs in VSCode (#57975)
6342befff8featsupport migrating full classes to signal queries (#58263)
7ecfd89592fixThe suppress diagnostics option should work for external templates (#57873)

localize

CommitTypeDescription
9c3bd1b5d1refactorremove deprecated name option. (#58063)

migrations

CommitTypeDescription
dff4de0f75featadd a combined migration for all signals APIs (#58259)
b6bc93803cfeatadd schematic to migrate to signal queries (#58032)
2bfc64daf1featexpose output as function migration (#58299)
59fe9bc772featintroduce signal input migration as ng generate schematic (#57805)
90c7ec39a0fixinject migration always inserting generated variables before super call (#58393)
7a65cdd911fixinject migration not inserting generated code after super call in some cases (#58393)
c1aa411cf1fixproperly resolve tsconfig paths on windows (#58137)
e26797b38efixreplace removed NgModules in tests with their exports (#58627)

platform-browser

CommitTypeDescription
c36a1c023bfixcorrectly add external stylesheets to ShadowDOM components (#58482)
5c61f46409refactorremove deprecated BrowserModule.withServerTransition method (#58062)

platform-server

CommitTypeDescription
9e82559de4fixdestroy PlatformRef when error happens during the bootstrap() phase (#58112)

router

CommitTypeDescription
f271021e19featAdd routerOutletData input to RouterOutlet directive (#57051)
b2790813a6fixAlign RouterModule.forRoot errorHandler with provider error handler (#57050)
a49c35ec76fixremove setter for injector on OutletContext (#58343)
7436d3180efixUpdate Resolve interface to include RedirectCommand like ResolveFn (#57309)

service-worker

CommitTypeDescription
8ddce80a0bfeatallow specifying maxAge for entire application (#49601)
1479af978cfeatfinish implementation of refreshAhead feature (#53356)

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.