Oct 19

An Angular upload progress bar that shows the server is still working

An upload bar that says 100% and then sits still while the server works looks frozen. Switch to a processing state when the last byte leaves the browser, then draw it however you like: six designs on one signal state.

angular · patterns · 4 min
→
Oct 18

Return a C# 15 union type instead of a Result class

C# 15 adds union types: a closed set of case types, implicit conversions from each one, and a switch the compiler checks for missing cases. For a service method with a few outcomes it reads better than a hand-written Result class. Keep it out of JSON for now: RC1 writes no case marker, and a plain read can't tell two object cases apart.

dotnet · patterns · 5 min
→
Oct 15

Fix the baseUrl error that TypeScript 6 raises in older Angular workspaces

Angular 22 builds with TypeScript 6, which turns the baseUrl that Angular CLI 7 to 16 put in every new tsconfig into a build error. ng update doesn't touch it. Delete baseUrl, add ./ to every path, and decide what to do with imports that only resolved because of it.

typescript · tooling · 4 min
→
Oct 14

Live updates from .NET 10 to Angular with Server-Sent Events

.NET 10's ServerSentEvents result streams an IAsyncEnumerable to the browser, and EventSource reads it, reconnects and sends Last-Event-ID with no library. For one-way job progress it's enough, once you've settled how the stream authenticates.

mixed · architecture · 5 min
→
Oct 13

Get upload progress back after Angular 22 moved HttpClient to fetch

Angular 22 made FetchBackend the default HttpBackend, and fetch can't report upload progress. With the old reportProgress flag the bar sits at 0% and then jumps to 100%, with no warning. Add withXhr() to the browser's provideHttpClient(), keep it out of the server config, and switch to reportUploadProgress so a missing withXhr() throws.

angular · development · 4 min
→
Oct 12

How EF Core 10 translates Contains over a list of IDs, and when to change it

EF Core 10 sends a Contains over a local list as one SQL parameter per value, padded to fixed sizes, where EF Core 8 and 9 sent one JSON parameter. Short lists get real row estimates. Long lists get slow: 2,000 IDs took about 49 ms against 3 ms in the JSON form on SQL Server. Keep the new default, and move the long-list query back with EF.Parameter.

dotnet · performance · 5 min
→
Oct 11

Add keyboard and screen-reader support to an Angular listbox with @angular/aria

Two directives from @angular/aria give a plain ul and li the listbox roles, the arrow and Home/End keys, roving focus and aria-selected. The directive binds keydown on the same element, so the handler you wrote before it has to go.

angular · development · 4 min
→
Oct 08

One-line left joins in EF Core 10 with LeftJoin

A left join in LINQ used to take a group join, a flatten and a DefaultIfEmpty. .NET 10 adds LeftJoin and EF Core 10 translates it, and on SQLite and SQL Server alike, both forms produce the same SQL string. Use it in new queries, keep the nullable right side in your projection, and leave working queries alone.

dotnet · development · 5 min
→
Oct 07

Before you move a build to TypeScript 7, check it for custom transformers

TypeScript 7 ships without a JavaScript API, so nothing in a build can hand it a custom transformer. The plugins entry in your tsconfig.json survives the upgrade, the compiler accepts it without a word, and the transformation stops happening while the build still exits 0.

typescript · tooling · 5 min
→
Oct 06

How to validate conditional fields in Angular Signal Forms

Signal Forms skip the validators on hidden and disabled fields, so a form with a conditional section can report valid() while a required field in the model is empty, or still holds an address the user backed out of. Build the object you send from the form state and leave the hidden sections out of it.

angular · patterns · 5 min
→