Skip to main content
1 vote
1 answer
151 views

Angular resource API: Why does loader stay in error state after params change?

We would like to try out the new resource API in Angular in combination with the new ngrx/signal-store. In production, we currently use httpResource to retrieve data from the backend. When an error is ...
nclskfm's user avatar
  • 262
1 vote
1 answer
892 views

Why do I need AbortSignal when using the resource API of angular. What is it's use?

I have been defining resource as follows: resource: ResourceRef<any> = resource<ResourceRequest | undefined, any>({ request: (): ResourceRequest | undefined => { return { id:...
Naren Murali's user avatar
-3 votes
1 answer
181 views

How to stop listening for signal changes, but retain the last fetched value in angular resource API - PAUSE functionality for Resource API

I have been going through the start/stop of resource API and wanted to know if there is a way to achieve a pause like functionality, but that I mean: The Resource API should stop listening for signal ...
Naren Murali's user avatar
1 vote
2 answers
891 views

How do I start/stop the angular resource and rxResource API which is declared at the initialization of a class or service

My base requirement is to start and stop the Resource API at will. By start/stop I mean to start/stop listening for signal changes (signals provided within the request callback). By start I mean, the ...
Naren Murali's user avatar
0 votes
1 answer
413 views

Can resource or rxResource be initialized through function or activated through button click

I tried to initialize my signal through button click, but I am getting the error: ERROR RuntimeError: NG0203: rxResource() can only be used within an injection context such as a constructor, a ...
Naren Murali's user avatar
2 votes
1 answer
299 views

Angular - rxResource() - how to react to changes in the database

"The Observable produced by the loader() function will consider only the first emitted value, ignoring subsequent emissions." What if there are changes in the database? Doesn't that defeat ...
KarlB's user avatar
  • 21
-1 votes
1 answer
442 views

I have signals in the service, I want to expose these signals to components (without using getter)

I have this scenario, My service holds few signals (They are use by resource API's to reactively fetch data and also show at the UI level) My requirement is that I want to expose these values to the ...
Naren Murali's user avatar
1 vote
1 answer
38 views

How to provide two different instances of an angular injectable in the same component with the new angular resource

I have an angular service as shown below: @Injectable({ providedIn: 'root' }) export class SelectItemGroupsResourceFacade { $assetPath = signal<string>('') $appName = signal<string>('')...
st_clair_clarke's user avatar
1 vote
1 answer
295 views

Creating a reusable loader for angular v19 resource API with 2 request parameters of different types

Below is the code that creates an angular19 reusable resource loader and its usage with a single request parameter: import { ResourceLoaderParams } from "@angular/core"; function todoLoader(...
st_clair_clarke's user avatar
1 vote
1 answer
132 views

Does the Angular resource API support adding an initial value for the resource?

Suppose we first check whether a resource is not loading like this: @if (!countriesResource.isLoading()) { <ul> @for ( country of countriesResource.value(); ...
Ole's user avatar
  • 1
2 votes
1 answer
346 views

Debouncing a search term when using the new Angular Resource API?

With RxJS we could debounce keystrokes like this prior to performing an http request. this.query$.pipe( debounceTime(500), distinctUntilChanged(), Does the new Angular Resource API have a way ...
Ole's user avatar
  • 1
3 votes
1 answer
2k views

Using Angular v18 resource with HttpClient

I'm trying to update my code to use the new Resource type. The Angular documentation for Resource has this example: const userId: Signal<string> = getUserId(); const userResource = resource({ ...
MageWind's user avatar
  • 851
0 votes
0 answers
15 views

Why don't AngularJS $resources resolve on my machine?

I have an AngularJS application that is running reliably on production and has no problems on my coworker's development machines. But when the app runs on my MacBook, it freezes after the first API ...
carpiediem's user avatar
  • 2,048
0 votes
0 answers
118 views

angularjs $resource: [action name in resource] is not a function

Context In one of my services i return a $resource()-call with different actions like so return $resource( 'api/someroute/:id', { }, { ...
Velulian's user avatar
  • 353
0 votes
1 answer
315 views

when try to add confirm mail function group get error Expected 1-2 arguments but got 3. ts(2554)?

Problem error Expected 1-2 arguments but got 3. ts(2554) when add confirm email as third argument ? I work on angular 7 I make register users form when do validation compare user mail to confirm ...
ahmed barbary's user avatar

15 30 50 per page
1
2 3 4 5
51