Angular 19.2: New features coming

Updated: 2025-02-10

ℹ️ Draft: The development of Angular 19.2 is not finished yet, this is a work-in-progress collection of notes.

Release date: This release should be ready at the end of February 2025. We will follow the weekly changes.

Here is a list of what can be useful in the daily activity of a developer.
Compiler improvement and bug fixes are not included.

If you want to test the new features you need the next version of Angular. For an existing project you can upgrade using ng update @angular/cli @angular/core --next

What's coming?

Node version: no change (yet), ^18.19.1 || ^20.11.1

Typescript version: added support for 5.8

Yarn version: no change (yet), >=1.22.4 <2

Changes:

Major new features

In a Live Q/A (https://www.youtube.com/watch?v=Gf2c24-knBU) the Angular Team said that for 18.2 httpResource (Experimental API) is one of the main new features.

Support for TypeScript 5.8

The support is for TypeScript 5.8 Beta, at the moment. Here you can see what is new with this release:
https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/

support default value in resource() and rxResource() https://github.com/angular/angular/pull/59655

https://next.angular.dev/api/core/resource# and https://next.angular.dev/api/core/rxjs-interop/rxResource

The default value will be returned when the resource is still loading, or it is in an error state.

Example:

export function resource<T, R>( 
options: ResourceOptions<T, R> & {defaultValue: NoInfer<T>}, 
): ResourceRef<T>; 
const res = resource({ 
      request, 
      loader: async ({request}) => { 
        if (request === 2) { 
          throw new Error('err'); 
        } 
        return ['data']; 
      }, 
      defaultValue: DEFAULT 
    }); 

Form validators support for Set (https://github.com/angular/angular/pull/45793)

Validators.required, Validators.minLength and Validators.maxLength didn't work with sets because these have a 'size' and not a 'length' property.
The change allows to validate sets.
This PR comes from an ex-colleague at SBB in Switzerland, kudos. It tooks almost 3 years to get it approved.

How to update to Angular@next?

In this post I explain how to update your local version to Angular@next

https://marmo.dev/angular-update


You could be interested in

Angular 18.0: New features coming

New features introduced in Angular 18.0
2024-02-01

Enums in Angular templates

How to use enum in the html template
2019-01-21

Angular 17.3: New features

New features introduced in Angular 17.3
2024-02-01
WebApp built by Marco using Java 21 - We don't store personal data - Hosting in Switzerland (no GAFAM)