mcpField
A
angular-signals-http

angular-signals-http

github.com/oguzhan18Development7169 installsUpdated 31w ago
Repository

About angular-signals-http

A reference skill for Angular developers combining Signals with HttpClient. It shows how to convert HTTP observables to signals and signals to observables.

Key features

  1. 01Convert HTTP observables with toSignal
  2. 02Convert signals with toObservable

Use cases

  1. 01Expose HTTP response data as a signal
  2. 02Use a signal through an observable API

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/oguzhan18/angular-ecosystem-skills --skill angular-signals-http

After installing, type/angular-signals-httpin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/discussions/
_INDEX.md
references/docs/
_INDEX.md
references/issues/
_INDEX.md
references/releases/
_INDEX.md

Details

From the project README

Angular Signals + HttpClient

Version: Angular 16+ (2025) Tags: Signals, HTTP, toSignal, toObservable

References: toSignal

Best Practices

  • Use toSignal for HTTP
import { toSignal } from '@angular/core/rxjs-interop';

@Component({})
export class MyComponent {
  private http = inject(HttpClient);
  
  users = toSignal(this.http.get<User[]>('/api/users'), {
    initialValue: []
  });
}
  • Use toObservable
import { toObservable, toSignal } from '@angular/core/rxjs-interop';

@Component({})
export class MyComponent {
  name = signal('John');
  name$ = toObservable(this.name);
}

Comments

Markdown supported