Angular v22 Resource APIs
Use this skill when Angular 22 async data should be modeled with the production-ready resource APIs.
SKILL.mdskills/angular/resources/angular-v22-resource-apis/SKILL.md
GitHubAngular v22 Resource APIs
Purpose
Use this skill when Angular 22 async data should be modeled with the production-ready resource APIs.
When to Use
Use this skill when:
- The feature needs asynchronous data loading in v22.
- You want resource or httpResource instead of ad hoc fetch orchestration.
- Tests or UI logic depend on the exact loading or value timing.
When Not to Use
Do not use this skill when:
- The change is purely synchronous signal state.
- The task is only about forms or routing.
- The project does not need async resource modeling.
Required Inputs
- async source
- sync vs async expectations
- SSR interaction
- test assumptions
Procedure
- Model the async source with resource or httpResource.
- Account for synchronous resolution when the loader emits synchronously.
- Keep loading, value, and error states explicit.
- Validate the component and test behavior after the change.
Do
- Use the production-ready resource APIs on v22.
- Keep the state model declarative.
- Document any sync-vs-async assumption in tests.
Do Not
- Do not hide async state behind a custom wrapper without a reason.
- Do not assume every resource resolves asynchronously.
- Do not mix resource modeling with unrelated template cleanup.
Review Checklist
- The async model is explicit.
- Sync resolution is handled correctly.
- Tests still match the runtime behavior.
Expected Output
- A resource-API summary.
- The chosen async model.
- Timing-related risks.