Claude
Skills
Sign in
Back

angular-signals-http

Included with Lifetime
$97 forever

ALWAYS use when working with Angular Signals and HttpClient, toSignal, toObservable, or HTTP with signals.

General

What this skill does


# Angular Signals + HttpClient

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

**References:** [toSignal](https://angular.io/api/core/toSignal)

## Best Practices

- Use toSignal for HTTP

```ts
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

```ts
import { toObservable, toSignal } from '@angular/core/rxjs-interop';

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

Related in General