angular-http
Implement HTTP data fetching in Angular v20+ using resource(), httpResource(), and HttpClient. Use for API calls, data loading with signals, request/response handling, and interceptors. Triggers on data fetching, API integration, loading states, error handling, or converting Observable-based HTTP to signal-based patterns.
Security Assessment
Detected risks:
About angular-http
The `angular-http` skill provides a comprehensive approach to managing HTTP data fetching in Angular v20+ applications. It addresses the challenges of handling asynchronous data, managing loading states, error handling, and integrating API calls seamlessly into reactive Angular components. By leveraging both traditional `HttpClient` methods and the newer signal-based `resource()` and `httpResource()` APIs, this skill allows developers to create more responsive and maintainable applications that automatically react to state changes and dynamic parameters.
Key features include signal-based HTTP resources through `httpResource()`, which wraps `HttpClient` requests with reactive signals for loading, error, and resolved states. Developers can define default values, conditionally skip requests, and trigger reloads manually. The generic `resource()` API enables custom asynchronous operations beyond HTTP, supporting reactive parameters and abortable fetches. Both tools provide state signals like `value()`, `hasValue()`, `error()`, and `isLoading()`, giving fine-grained control over UI rendering and user feedback. This skill also supports full request customization including headers, query parameters, and request methods, ensuring flexible integration with any RESTful API.
This skill is particularly useful for frontend developers building Angular applications that require real-time or reactive data handling. Typical use cases include fetching user profiles, managing search queries, loading lists of resources like todos, and converting Observable-based HTTP streams into signal-based reactive patterns. It is ideal for teams looking to modernize their Angular applications with signal-based state management, simplify complex asynchronous operations, and enhance user experience by managing loading states and errors more effectively.
FAQ
How do I create a reactive HTTP request that updates when a signal changes?
You can use `httpResource()` with a function that references a signal. The resource automatically refetches whenever the signal changes.
Which Angular versions are compatible with this skill?
This skill is designed for Angular v20 and later, leveraging the latest signal-based APIs introduced in these versions.
Can I skip a request conditionally based on parameters?
Yes, both `httpResource()` and `resource()` allow returning `undefined` from the params function to skip loading the resource when conditions are not met.
Does this skill support non-HTTP asynchronous operations?
Yes, the generic `resource()` API can handle any asynchronous operation, not just HTTP requests, with support for reactive parameters and abort signals.
What state indicators are available for resources?
Resources provide signals such as `value()`, `hasValue()`, `error()`, `isLoading()`, and `status()` to track the current state and handle UI updates accordingly.
Install angular-http
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
analogjs/angular-skills