Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
4 posts found #httpresource
Managing Server State: resource, httpResource, chain() and Invalidation After Mutations
Frontend PART 03

Managing Server State: resource, httpResource, chain() and Invalidation After Mutations

In Angular 22, server state is managed with the resource family, which carries the loading, error, reloading and local statuses itself: read with httpResource, write with HttpClient, and refresh the resource with reload() after a mutation. On Bookstore's book page we show with real output dependent resources with chain(), an optimistic review with rollback, two components fetching the same list, NgRx 22's withPreviousValueOnLoading and what reading value() in error does.

14 Nov 2026 16 min 10
What Is State in Angular and Where Should It Live? Separating Server, UI, URL and Form State
Frontend PART 01

What Is State in Angular and Where Should It Live? Separating Server, UI, URL and Form State

Where state lives is decided by two questions: who owns the data (the API, the address bar, the browser) and how long it must live; server state goes in a resource, URL state in a query param, local state in the component, shared client state in a service, and derived values are never stored. On Bookstore's catalog page we show with a real run what happens to the four kinds on Back and on reload, and prove that copying the API response into a global store shows stale stock.

14 Nov 2026 14 min 10
Testing Services, Pipes, Signals and Resources in Angular: TestBed.inject, HttpTestingController and Fake Timers
Testing & Quality PART 02

Testing Services, Pipes, Signals and Resources in Angular: TestBed.inject, HttpTestingController and Fake Timers

httpResource reports loading right away but sends the request inside an effect; a test needs TestBed.tick() to see the request and whenStable() to read the value after the response. Using Bookstore's CatalogService, PricePipe and RecentlyViewed, we show runInInjectionContext, effect tests, cancellation and the error path with HttpTestingController, fake timers for debounced(), and the resource timing change in Angular 22, all with real runs.

14 Nov 2026 12 min 13
Angular 20: Stable Signal APIs, httpResource and the New File Naming
Frontend PART 29

Angular 20: Stable Signal APIs, httpResource and the New File Naming

In Angular 20, effect, toSignal and linkedSignal become stable, resource swaps request for params, httpResource arrives, app.ts replaces app.component.ts and *ngIf gets deprecated.

31 Oct 2026 7 min 122
Blog Map