Skip to main content

All Questions

Tagged with
1 vote
1 answer
30 views

Input Subject is empty in child component Angular 17

I am trying to pass data from a parent to its child component in Angular 17. The data is retrieved from the back-end through an API that gets an array of items. In my parent component, items$ is a ...
Ems's user avatar
  • 172
0 votes
0 answers
39 views

Angular Tanstack Cached Observables are refreshing data and not using the cache causing problems

I'll keep it short as possible >< -I have a left hand menu with items that can be expanded/collapsed. This is dependent on "getAll()" and works as expected. -When I incorporated "...
NeuralCode's user avatar
1 vote
1 answer
64 views

Why using EventEmitter in angular is considered bad practice

In an angular project (v17), I've used EventEmitter to notify one component, of the changes of another, somewhat unrelated (not a parent nor grandparent, not a child nor a grandchild) component. I can'...
III_phr's user avatar
  • 76
1 vote
1 answer
47 views

Call function after signal value change

I have a component with a simple login form. @Component({ selector: 'app-login', standalone: true, imports: [ ReactiveFormsModule, MatCardModule, ... ], templateUrl: './login....
Pawel's user avatar
  • 11
1 vote
3 answers
58 views

Initialize BehaviorSubject with value from Observable

I was trying to create an item counter for Wishlist Entries in my header area and tried to apply the solutions suggested here (for Cart Items) Change shopping-cart count in header in Angular ...
Sergej Bjakow's user avatar
0 votes
2 answers
43 views

Losing reference to this in async function inside subscribe

I'm almost new to Angular and I'm really lost with the async and sync methods, await, observables, promises... I have a button that opens a modal window, reads a barcode and with the information of ...
Nessarose's user avatar
2 votes
3 answers
109 views

How to modify data in an angular component when using async pipe

I have an Angular 18 component that receives an observable, which I render on the page using an async pipe. I want to be able to modify the data within this component and then press a "Save"...
Chris Barr's user avatar
  • 33.8k
1 vote
0 answers
47 views

RxJs Observables and Subjects resolving async process times when browser is in focus

I'm a bit new to Angular and have forked a complex project that in a subscription to a websocket, uses Observables, Subjects and ReplaySubjects altogether to achieve a function that I summarize here: ...
Manu Sisko's user avatar
0 votes
2 answers
72 views

forkJoin after APIs are completed - rxjs

So,I'm in kind of fix here. I've got 2 GET APIs. I need to do something once those APIs return success. I did the following. let sub1$ = this.myService.callFirstApi(); let sub2$ = this.myService....
Snk's user avatar
  • 149
0 votes
1 answer
44 views

Why is this returning a subscription instead of an observable?

I have a function that adds an item to my list, it returns an observable that I can display some data add() { let data$ = of(this.data); data$.subscribe((val: any) => { let ...
Snorlax's user avatar
  • 4,735
0 votes
1 answer
43 views

How to remove item from observable list?

I have a simple todo list that when clicking on "complete", it should remove that item from the list, but nothing seems to be happenning when clicking on it. Stackblitz: Link HTML: <div *...
Snorlax's user avatar
  • 4,735
0 votes
0 answers
44 views

Angular Login/Logout Behavior

I have a question. I have an application with Login and Logout which works, but with a hiccup. Here is the scenario. Using Observable, When user logins in it shows there user name, when they logout ...
user2280852's user avatar
0 votes
1 answer
85 views

How can I test an Angular component property value updated by observable callback before finalize() is called?

I have a component property that is updated in the next method of an observable I subscribe to that represents the upload progress of an http event. When writing unit tests for this method, I want to ...
Rick's user avatar
  • 43
1 vote
2 answers
70 views

Why does my state observable tell me Type must have a [Symbol.iterator]()

Framework: Angular v18.1.0 Dependencies: RxJS v7.8.0 @ngrx/effects v18.0.2 @ngrx/store v18.0.2 Given the following RxJS architecture. I have a simple reducer with one state and an interface with a ...
Mark Hill's user avatar
  • 1,839
0 votes
0 answers
19 views

this._user.next(value); is not propagating to the GUI in which cases?

I am going off a template and I have the following UserService @Injectable({ providedIn: 'root' }) export class UserService { private _baseClient = inject(BaseClient); private _singleModel = ...
Dean Hiller's user avatar
  • 20.1k

15 30 50 per page
1
2 3 4 5
405