Sitemap
TechVibes

TechVibes

I love writing about anything related to software and technology! I like to focus on the realm of web development and web tech.

Member-only story

Angular Resource API

2 min readSep 22, 2025
Press enter or click to view image in full size

Angular has an experimental resource API that will help us perform async operations, such as requesting data from an external API, more reactively.

Let’s look at a real example of using resources to request data from an API!

One neat thing about httpResource is that it is just a signal wrapper around the HttpClient, so don’t think that HttpClient is going away any time soon.

I’ll make a small demo app that displays some sweet sweet dog facts (who doesn’t like dogs?)

If you want to check it out for yourself, here’s the dog fact API I’m using https://dogapi.dog/ it’s free and very cool!

This is a very simple example, but shows us three important things about httpResource.

The first thing you’ll notice is just how easy it is to start making these API calls. Unlike with HttpClient, you don’t have anything to subscribe to which helps prevent memory leaks.

You’ll also notice that the httpResource has a lot of really helpful utilities that can tell us when the request is loading, if it has failed, and…

--

--

TechVibes
TechVibes

Written by TechVibes

I love writing about anything related to software and technology! I like to focus on the realm of web development and web tech.