Questions tagged [observable]
An observable is typically a programming construct that can be "watched" by other parts of the code, called the "observers". Different frameworks and programming languages have different implementations for observables, so this tag should typically be used in conjunction with others.
observable
9,638
questions
3
votes
2
answers
100
views
Looping through Observable and mapping result cuncurrently
I have a NgRx selector data$: Observable<Data[]> which contains array of objects. Inside my component I need to go through each data item and make two HTTP calls. One is conditional (based on ...
1
vote
3
answers
44
views
Why RXJS filter operator not working here?
I have a switchMap that I need to check for additional condition before I go into subscribe, in this I want to pick out the studyId that matches with the provided studyId I got:
this.studyIdObs$....
0
votes
0
answers
16
views
Struggling with mapping a nested Apollo query result to another value
I have a use case in Angular Apollo that looks something like:
eval(someId: number): Observable<string | Error> {
return this.apollo.query<FirstQuery>({
query: FirstDocument,
...
3
votes
2
answers
115
views
RxJS observable that fires if it's the first of a kind OR a certain time went by
Hey RxJS pros out there,
I have a stream that procs multiple times a second. Now I want an observer that procs if it's the first of a kind OR a certain time went by after the last proc. I want to ...
1
vote
1
answer
27
views
RxJS Create two observables from one obseravable
I have this:
$someObserver
.subscribe(foo => {
if(foo === "Bar" ) {/*Do A*/}
else {/*Do B*/}
});
It works. What I want: achieving the same but without conditions and with ...
0
votes
1
answer
33
views
How to listen to KeyboardEvent depending on an Observable value?
I am new to angular and I struggle with Observables. I searched for my question but I didn't find an answer for my exact problem.
I'm trying to enable/disable keyboard events depending on a variable (...
3
votes
0
answers
47
views
Can observables support data consistency in flow graphs which rejoin?
There is a very helpful guide Signals vs. Observables at builder.io contrasting the different semantics of signals and observables. Whilst it draws the helpful distinction that signals are "pull&...
0
votes
0
answers
51
views
New @Observable Macro: Should private properties be @ObservationIgnored? (iOS 17+)
All articles I read put @ObservationIgnored for private properties. However, Apple in their Focus Cookbook sample project, didn't put @ObservationIgnored to private properties.
0
votes
0
answers
25
views
After update angular 16 - property '_isScalar' does not exist on type 'Observable<any[]>'
I recently updated to angular 16 from V15, After change the observable which we declared doesn't contain/returning the propertly '_isScalar' which is worked before
"rxjs": "~7.5.5",...
1
vote
1
answer
28
views
Error in Angular components shows loading and not loading using if-else
im learning angular 18 SSR. I have a render problem when i load data from a graphql service; the load elements (skeletons) are showed using the value loading from a signal converted from a service ...
0
votes
2
answers
83
views
Why emit event in subscribe() is not emiting the data?
In my child component when I got a success from api call i am emiting data to parent component. But it's not working.
ChildComponent.ts
taskCompleted(taskId: number) {
const patchObject: ...
0
votes
1
answer
58
views
Why Angular httpclient use observers and not promises?
I've been looking in angular documentation, why httpClient use observers, but I didn't find a good answer.
My question is because I am working on a large project and we are looking for the most ...
0
votes
1
answer
34
views
NgFor only supports binding to Iterables, such as Arrays. Did you mean to use the keyvalue pipe
I am facing an error while returning a function, in which I get values in observable format and I store it in an array. I get error while i loop the array in template file.
Here is the function (ts ...
0
votes
0
answers
37
views
Despite calling all changes to a Text view within a DispatchQueue.main.async call I still get the purple warning regarding Publishing changes
In my app, I am uploading a file to my server from my ObservableObject (HTTPHandler). The published strings from HTTPHandler are used by the view (UploadTemplate) to convey status and errors.
...
0
votes
1
answer
26
views
Is there a specific way to change the string of a Text View when calling from an ObservableObject in another thread?
In my app, I am uploading a file to my server from my ObservableObject (HTTPHandler). The published strings from HTTPHandler are used by the view (UploadTemplate) to convey status and errors.
...