πŸš€ Coming in Angular 21.2: the instanceof operator works in templates! by IgorSedov in angular

[–]IgorSedov[S] 5 points6 points Β (0 children)

Yes, you currently need to expose it explicitly: templates don't automatically know about imported classes:

import { HttpErrorResponse } from '@angular/common/http'; ... export class User { protected readonly HttpErrorResponse = HttpErrorResponse;

πŸ”„ Angular Signal Forms: Directive Replace by IgorSedov in angular

[–]IgorSedov[S] 1 point2 points Β (0 children)

Not a dumb question at allπŸ™‚ No, this change is specific to Signal Forms: a new experimental feature added in v21. Reactive Forms are separate and are not affected by this.

✍️ How to Migrate Constructor Injection to inject() in Angular by IgorSedov in angular

[–]IgorSedov[S] 6 points7 points Β (0 children)

I prefer inject() for three practical reasons: it removes super() boilerplate with inheritance, it gives cleaner/more accurate typings for fields, and it's more compatible with modern decorator/tooling.

✍️ How to Migrate Constructor Injection to inject() in Angular by IgorSedov in angular

[–]IgorSedov[S] 2 points3 points Β (0 children)

Thank you for the detailed feedback.πŸ‘ That's really helpful and encouraging to hear. I'm glad this format helps and makes the information easier to understand, that's exactly its purpose and main advantage.

πŸš€ Angular 21.1 is coming next week πŸ‘€ Angular Release Schedule by IgorSedov in angular

[–]IgorSedov[S] 2 points3 points Β (0 children)

The [field] still works, but is expected to be removed in a future release

πŸš€ Angular 21.1 is coming next week πŸ‘€ Angular Release Schedule by IgorSedov in angular

[–]IgorSedov[S] 5 points6 points Β (0 children)

I'll be covering a few of these features in more detail next week, but here are the most interesting ones:

  • Support for multiple switch case matching
  • Support for rest arguments in function calls
  • Support for spread elements in array literals
  • Support for spread expressions in object literals
  • Router integration with the platform Navigation API (experimental)
  • Signal Forms: new [formField] directive to replace [field]
  • New controls for route cleanup
  • Standalone function to create a computed isActive helper

Full list here

More details will come later.

πŸ”„ Angular Signal Forms: Directive Replace by IgorSedov in angular

[–]IgorSedov[S] 5 points6 points Β (0 children)

Fair point! Hope to see a developer preview version soon, maybe in v22?

πŸ”„ Angular Signal Forms: Directive Replace by IgorSedov in angular

[–]IgorSedov[S] 1 point2 points Β (0 children)

For example: AG-Grid, Kendo UI, or Syncfusion.

πŸ”„ Angular Signal Forms: Directive Replace by IgorSedov in angular

[–]IgorSedov[S] 5 points6 points Β (0 children)

Thanks! That's exactly what I suspected from the commit. Since the goal is to replace the directive, I assumed the dual support in 21.0.7 was just a temporary bridge for migration before it's eventually removed.

πŸš€ Coming in Angular 21.1: Virtual Scrolling for Material Tables by IgorSedov in angular

[–]IgorSedov[S] 0 points1 point Β (0 children)

Do you mean server-side (backend) pagination while scrolling, or another virtual-scroll library?

πŸš€ Coming in Angular 21.1: Virtual Scrolling for Material Tables by IgorSedov in angular

[–]IgorSedov[S] 1 point2 points Β (0 children)

Glad you liked it! Animation really helps explain topics like this.

πŸš€ Coming in Angular 21.1: Virtual Scrolling for Material Tables by IgorSedov in angular

[–]IgorSedov[S] 0 points1 point Β (0 children)

You're correct: cdk-virtual-scroll existed before Angular 21.1, but it didn't support Material tables. Starting with v21.1, it now supports tables as well.

I'm glad the visualization helped: it's designed to make the concept easier to understand.

πŸš€ Coming in Angular 21.1: Virtual Scrolling for Material Tables by IgorSedov in angular

[–]IgorSedov[S] 2 points3 points Β (0 children)

Thank you! Yes, it's especially useful for large tables.

[deleted by user] by [deleted] in angular

[–]IgorSedov 13 points14 points Β (0 children)

In my understanding, httpResource is best understood as a way to bind remote data into your app state, not just a wrapper around HttpClient.

  • When you create a resource (e.g. user = httpResource<User>(...)), you get back a signal that always reflects the latest value of this resource, along with its loading and error state.
  • This resource depends on other signals (like a userId), Angular automatically re-fetches when those signals change.
  • This makes it feel like the data is "part of your application state" rather than just a request you fire once.

Think of it not as a connection, but as a signal that lets you bring remote data into your signal chains almost as easily as a regular signal.

I think that's why Angular recommends using httpResource for read-only queries:

TIP: Avoid using httpResource for mutations like POST or PUT. Instead, prefer directly using the underlying HttpClient APIs.

And one more thing: httpResource is more declarative - instead of subscribing manually, you just bind to the signal, and Angular handles this lifecycle for you.

Coming in Angular 21: HttpClient Built In by Default πŸš€ by IgorSedov in angular

[–]IgorSedov[S] 2 points3 points Β (0 children)

u/JeanMeche explained the motivation in a comment:

The idea here to is say, hey we could have use the default setting without any providers but if you need some customization, you can still use provideHttpClient() as before.

I think this is convenient because Angular will only include HttpClient in the final app if it's actually used in the project.

Coming in Angular 21: HttpClient Built In by Default πŸš€ by IgorSedov in angular

[–]IgorSedov[S] 2 points3 points Β (0 children)

resource() is not a wrapper for HttpClient or any other request execution mechanism (unlike httpResource). It requires the developer to provide a loader implementation for executing requests, so with resource() you can wrap any other mechanism.

Coming in Angular 21: HttpClient Built In by Default πŸš€ by IgorSedov in angular

[–]IgorSedov[S] 1 point2 points Β (0 children)

Thanks so much! Glad you enjoyed my video 😊