惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
Y
Y Combinator Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
L
LangChain Blog
美团技术团队
N
Netflix TechBlog - Medium
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog
博客园 - 司徒正美
爱范儿
爱范儿
D
DataBreaches.Net
月光博客
月光博客
U
Unit 42
B
Blog RSS Feed
Engineering at Meta
Engineering at Meta
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
MongoDB | Blog
MongoDB | Blog
腾讯CDC

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Ng-News 26/15: Angular 22
ng-news · 2026-06-24 · via DEV Community

Angular 22 stable resources and Signal Forms are the headline topics, together with new dependency injection APIs such as @Service and injectAsync. Also in brief: debounced(), Vitest migration support, ChangeDetectionStrategy.Eager, WebMCP, community write-ups, and the ng-neat recovery.

Stable resources and Signal Forms

Angular 22 is out. Probably the most outstanding feature is the stabilization of the resource and the Signal Forms. There's much more but let's start with these two.

Resources, that are three functions resource(), rxResource() and httpResource(), have been introduced during Angular 19. There were some significant changes in Angular 20, and then in Angular 21 we got the snapshot feature. Resources have been experimental all the time, and after almost 1.5 years, they leave experimental status and become stable.

Similar story for Signal Forms, but at a just faster pace. They were introduced in 21 and are now also stable, so no developer preview either.

So in some way, these are features we already knew and some of us were already using quite successfully.

And let's not forget, also @angular/aria, the headless design system also became stable.

What's new in Angular 22.0? - Ninja Squad

Angular 22.0 is out!

favicon blog.ninja-squad.com

@Service, injectAsync, and debounced()

But, there are new features as well.

For one, we have the @Service decorator. That means it is on one side a shortcut for @Injectable({ providedIn: 'root' }) and on the other prevents using dependency injection via the constructor. Instead of constructor-based DI, you should go with the inject function and there is a dedicated migration available (ng generate @angular/core:inject).

@Service()
export default class NewsletterClient {
  private httpClient = inject(HttpClient);

  send(email: string): Observable<boolean> {
    return this.httpClient.post<boolean>(
      'http://some.host.com/newsletter/subscribe',
      { email },
    );
  }
}


Another feature for dependency injection is the asynchronous injector. So the value returned by injectAsync is not the service instance itself - you call it when you need the service and await the result. Why do we need it? Well, same thing why we do lazy loading in the router. We only want to load when it is actually needed.

export class NewsletterPage {
  private readonly newsletterModel = signal({ email: '' });
  private readonly newsletterClient = injectAsync(
    () => import('./newsletter-client'),
  );

  protected readonly newsletterForm = form(
    this.newsletterModel,
    (path) => { },
    {
      submission: {
        action: async () => {
          const client = await this.newsletterClient();
          client.send(this.newsletterModel().email)
        },
      },
    },
  );
}

So you won't use injectAsync when you need the service immediately but more when a user clicks on something or some later events. The service needs to be providedIn: 'root'. So it's best if you already apply the new @Service decorator.


And we have a debounced function. You give it a signal and a debounce time, and you are getting back a resource. Debouncing means, when the signal's value changes, the value in the derived resource would wait for the defined period of time until a new value comes. If that's not the case, then the resource will take on that value, and if not, the debouncing starts again.

As every Signal has an initial value, the debouncing for the first value doesn't happen.

@Component({
  selector: 'app-debounced',
  template: `Value {{ debouncedCounter.value() }}`,
})
export class DebouncedPage {
  protected readonly counter = signal(1);

  protected readonly debouncedCounter = debounced(this.counter, 600);

  constructor() {
    setTimeout(() => this.counter.update((v) => v + 1), 500);
    setTimeout(() => this.counter.update((v) => v + 1), 1_000);
    setTimeout(() => this.counter.update((v) => v + 1), 1_500);

    effect(() => {
      console.log(`value updated ${this.debouncedCounter.value()}`);
    });
  }
}

debounced() is experimental. @Service and injectAsync are not.

Angular 22: The Most Important New Features at a Glance - ANGULARarchitects

Angular 22 stabilizes the Resource API and Signal Forms, makes OnPush the default change detection strategy, and brings @Service, injectAsync, debounced, as well as numerous template and router improvements. This article shows the relevant updates using concrete examples.

favicon angulararchitects.io

Vitest and change detection

In Angular 21, we've received Vitest as the new default testing framework. It was not possible to easily migrate because a lot of us were using fakeAsync or waitForAsync to manage asynchronous tasks in tests. With Angular 22, that is possible again, but remember, fakeAsync and waitForAsync depend on zone.js. So if you have plans to move to zoneless or are already there, it is not an option.

If you run ng update, your components which are not OnPush will get a ChangeDetectionStrategy.Eager. That's the new alias for the old Default value, because default is not OnPush. Speaking of zoneless, if you want to migrate, staying with zone.js and moving all your components to OnPush as an intermediate step is a good approach.

WebMCP

Also in terms of AI, there is experimental support for WebMCP. That means an agent can connect to your web application and can execute certain tool calls. That means, you in Angular have to expose calls to services with a description and so on, and then if the browser supports it, the agent can call them. So it is not necessary anymore that the browser has to read and interact with the DOM.

WebMCP is still in development, but we can expect to hear more from it in the future. There is also a feature which sets up forms for WebMCP.

rel="noopener">ngneat-archive on GitHub

Community content

As always, there is a lot of community content out there. We had a release video, a release blog and Mark Thompson, Angular's DevRel, was also guest at the Angular Plus Show.

For this episode, we additionally used the blogs from Cedric Exbrayat from Ninja Squad, Manfred Steyer from Angular Architects, and Mateusz Stefańczyk from House of Angular.

What's new in Angular 22.0? - Ninja Squad

Angular 22.0 is out!

favicon blog.ninja-squad.com

Angular 22: The Most Important New Features at a Glance - ANGULARarchitects

Angular 22 stabilizes the Resource API and Signal Forms, makes OnPush the default change detection strategy, and brings @Service, injectAsync, debounced, as well as numerous template and router improvements. This article shows the relevant updates using concrete examples.

favicon angulararchitects.io

ng-neat GitHub

Last but not least, a very important information. Last weekend, the popular ng-neat organization was removed from GitHub. That contained widely used libraries, like Elf for state management and Spectator for testing. Before that, members of the organization were also removed. At the moment, we don't know why because there was no official communication from the owner.

What is important though, that most of the libraries have been recovered and found their way back to GitHub under a new organization called ngneat-archive. We will keep you updated on this topic.

Reddit thread