<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/getting-to-know-angular-resource-snapshots-fcrvwqtfh" -->

---
title: Getting to Know Angular Resource Snapshots | daily.dev
description: A hands-on walkthrough of Angular's Resource API snapshots explains how to retain previous data while a resource is loading or has errored, avoiding UI...
canonical: https://daily.dev/posts/getting-to-know-angular-resource-snapshots-fcrvwqtfh
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Getting to Know Angular Resource Snapshots | daily.dev
og:description: A hands-on walkthrough of Angular's Resource API snapshots explains how to retain previous data while a resource is loading or has errored, avoiding UI...
og:url: https://daily.dev/posts/getting-to-know-angular-resource-snapshots-fcrvwqtfh
og:image: https://api.daily.dev/og/posts/fCrVwQTfh.png
og:image:alt: Getting to Know Angular Resource Snapshots
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting to Know Angular Resource Snapshots

**[Angular.love](https://daily.dev/sources/angularlove)** · 9 min read · 0 upvotes · 0 comments

## Summary

A hands-on walkthrough of Angular's Resource API snapshots explains how to retain previous data while a resource is loading or has errored, avoiding UI flicker. It covers reading a resource's snapshot, converting it back with resourceFromSnapshots, and using linkedSignal to build a withPreviousValue helper. It then extends this into a resilientResource function that supports keepValueWhileLoading and keepValueOnError options, plus a custom hasError flag, with a working code repository linked for reference.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://angular.love/getting-to-know-angular-resource-snapshots>

## Questions this post answers

### How do I keep the previous value displayed while an Angular resource is reloading with new params?

Use linkedSignal on the resource's snapshot property to detect when status is 'loading' and a previous non-error value exists, returning a loading snapshot that carries the previous value forward, then convert it back to a usable resource with resourceFromSnapshots. This pattern, shown in Angular's own documentation as withPreviousValue, prevents the UI from flashing to an empty state during refetches.

_daily.dev surfaces Angular Signals patterns like this for developers wiring up resource-based loading states._

### Why does accessing value on an Angular Resource throw an error when the status is error?

Angular's Resource implementation computes value with logic that explicitly throws a ResourceValueError whenever the internal state status is 'error', so value and error can never coexist through the standard API. Retaining data on error requires a workaround: intercept the snapshot, convert an error state back into a 'resolved' status carrying the previous value, and track the failure separately with a custom hasError signal.

_developers debugging Angular resource error handling can track these API quirks on daily.dev._

## Similar posts on daily.dev

- [Data Fetching in Modern Angular](https://daily.dev/posts/data-fetching-in-modern-angular-bxenxor9o) · Telerik · 4 upvotes · 0 comments
- [NgRx 22: Resource Extensions and Dynamic Deep Signals for Angular](https://daily.dev/posts/ngrx-22-resource-extensions-and-dynamic-deep-signals-for-angular-r6emmfjwm) · InfoQ · 0 upvotes · 0 comments
- [Angular Resource APIs Explained: Generating Signal-Based Service Proxies](https://daily.dev/posts/angular-resource-apis-explained-generating-signal-based-service-proxies-68fcfnmf9) · We Are .NET · 0 upvotes · 0 comments
- [Signal-Driven Error Monitoring: Detecting and Debugging Reactive Failures in Angular](https://daily.dev/posts/signal-driven-error-monitoring-detecting-and-debugging-reactive-failures-in-angular-r0d0mo3v3) · AppSignal · 1 upvotes · 0 comments
- [Angular 22 Is Officially Signal-First: Here’s Everything That Changed — Here’s What Changes in NG 22 \(Part 6\)](https://daily.dev/posts/angular-22-is-officially-signal-first-here-s-everything-that-changed-here-s-what-changes-in-ng-22-e8ybiaj8j) · JavaScript in Plain English · 1 upvotes · 0 comments

---

Tags: [#typescript](https://daily.dev/tags/typescript), [#angular](https://daily.dev/tags/angular)

[View this post on daily.dev](https://daily.dev/posts/getting-to-know-angular-resource-snapshots-fcrvwqtfh)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Getting to Know Angular Resource Snapshots","url":"https://daily.dev/posts/getting-to-know-angular-resource-snapshots-fcrvwqtfh","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/getting-to-know-angular-resource-snapshots-fcrvwqtfh"},"datePublished":"2026-09-20T07:44:44.356Z","dateModified":"2026-09-20T07:49:12.109Z","description":"A hands-on walkthrough of Angular's Resource API snapshots explains how to retain previous data while a resource is loading or has errored, avoiding UI...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4129545ffb73f030535de541d8185dd6?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4129545ffb73f030535de541d8185dd6?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Angular.love","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Angular.love","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/b638946cd9c74bf6a260e4e6a40212d7","url":"https://daily.dev/sources/angularlove"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/getting-to-know-angular-resource-snapshots-fcrvwqtfh","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"typescript,angular","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Angular.love","item":"https://daily.dev/sources/angularlove"},{"@type":"ListItem","position":3,"name":"Getting to Know Angular Resource Snapshots"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/getting-to-know-angular-resource-snapshots-fcrvwqtfh#faq","mainEntity":[{"@type":"Question","name":"How do I keep the previous value displayed while an Angular resource is reloading with new params?","acceptedAnswer":{"@type":"Answer","text":"Use linkedSignal on the resource's snapshot property to detect when status is 'loading' and a previous non-error value exists, returning a loading snapshot that carries the previous value forward, then convert it back to a usable resource with resourceFromSnapshots. This pattern, shown in Angular's own documentation as withPreviousValue, prevents the UI from flashing to an empty state during refetches. daily.dev surfaces Angular Signals patterns like this for developers wiring up resource-based loading states."}},{"@type":"Question","name":"Why does accessing value on an Angular Resource throw an error when the status is error?","acceptedAnswer":{"@type":"Answer","text":"Angular's Resource implementation computes value with logic that explicitly throws a ResourceValueError whenever the internal state status is 'error', so value and error can never coexist through the standard API. Retaining data on error requires a workaround: intercept the snapshot, convert an error state back into a 'resolved' status carrying the previous value, and track the failure separately with a custom hasError signal. developers debugging Angular resource error handling can track these API quirks on daily.dev."}}]}
```

