NG.II · Angular 22 practice question

A developer is building a component that fetches user data using an Angular Resource. If the component's view needs to show a 'Retry' button, which resource status should they check to determine if the data fetching process has failed?

Choose one answer
Check answer and explanation

Correct answer: The status is 'error', indicating the loader encountered a problem.

Explanation

The status is 'error', indicating the loader encountered a problem.

Common trap

Checking for 'loading' would only indicate an ongoing request, not a failure. 'idle' means no request was initiated.

Source: Angular docs: Async reactivity with resources — Resource status
Checked against the cited text on 2026-11-25.

Report an error in this question