observable Questions
2
Solved
Prior to iOS 17, I was used to creating SwiftUI views with a generic approach where a view is constrainted to one view model, and that ViewModel can be a protocol. This was very nice for testing an...
Attlee asked 10/1 at 16:32
7
Solved
Using PrimeNg's dynamic dialogue example shows how the destination dialogue can get data and display.
I can go through creating a service with observables to pass the data to the dialogue, but I k...
Socher asked 2/2, 2019 at 5:44
2
Solved
I'm building an app with SwiftUI. When I was trying to display a sheet (previously Modal), this error message appears:
Thread 1: Fatal error: No observable object of type BixiStationCombinedListVi...
Stupid asked 20/8, 2019 at 23:52
7
I have this part of code in my application
addComment (body: Object): Observable<Comment[]> {
//let bodyString = JSON.stringify(body); // Stringify payload
let bodyString = JSON.parse(JSON....
Promptbook asked 8/3, 2017 at 16:21
7
If I have the need to bind multiple properties from the same observable within my component template...
For example:
<my-random-component[id]="(myObservable$ | async).id">
...
<my-rando...
Holystone asked 10/10, 2018 at 22:30
6
Solved
example:
var s1 = Observable.of([1, 2, 3]);
var s2 = Observable.of([4, 5, 6]);
s1.merge(s2).subscribe(val => {
console.log(val);
})
I want to get
[1,2,3,4,5,6]
instead of
[1,2,3]
[4,5...
Fussy asked 23/5, 2017 at 17:38
4
Solved
I need a specific behavior that I can't get with the RxJS operators. The closest would be to use DebounceTime only for values entered after the first one, but I can't find a way to do it. I have al...
Turbojet asked 7/2, 2022 at 10:2
1
Please help me understand the difference between @Bindable and @State.
If I take the following example from the Xcode Documentation and change @Bindable with @State like this: @State var book: Book...
Cracking asked 14/2 at 12:12
3
Solved
I have a need to detect when an observable (observedEvents) has been subscribed to, and then subscribe to another observable (triggerEvent). I don't want to subscribe to triggerEvent manually, but ...
Inellineloquent asked 14/6, 2017 at 22:20
31
Solved
When should I store the Subscription instances and invoke unsubscribe() during the ngOnDestroy life cycle and when can I simply ignore them?
Saving all subscriptions introduces a lot of mess into c...
Phrygian asked 24/6, 2016 at 7:52
4
So I have this question about $ sign suffix naming convention in the RxJs code and Angular specifically.
In angular best practices documentation and in the overall I have found that we should use i...
Damnedest asked 21/11, 2021 at 8:40
5
Solved
I'm trying to convert an Observable into a BehaviorSubject. Like this:
a$ = new Observable()
b$ = BehaviorSubject.create(new BehaviorSubject(123), a$)
// 🔴
I have also tried:
a$ = new Observable(...
Monosyllabic asked 19/11, 2018 at 9:57
3
Solved
let's say you have 2 observables:
const obs1$: Observable<string[]> = this.getObs1$();
const obs2$: Observable<string[]> = this.getObs2$();
i want to combine these 2 so that in subscri...
Rigel asked 29/1, 2022 at 7:16
1
Solved
I've been trying to implement my own RxJS operator, so that I can "plug it" to my Angular's HttpClient. I'd like to keep the request ongoing (polling) every X milliseconds, but also in ca...
Adkins asked 2/11, 2023 at 21:21
7
Solved
In my Angular 2 app i have many observables and subscriptions.
Ofcourse I should unsubscribe when I leave the page, but i'm trying to find out if it's possible to get the number of active subscrip...
Filature asked 4/9, 2016 at 9:58
2
Solved
With the new @Observable macro introduced for iOS 17, we can now use environment objects in the following way
@Environment(MyType.self) var myTypeObj
Now if myTypeObj has some property, call it my...
Visual asked 23/8, 2023 at 3:37
1
I am surprised and don't really understand the behavior I am seeing with the new @Observable framework in iOS 17.
It seems that if the view containing the @State var, ie viewModel, is modified, the...
Ellon asked 17/10, 2023 at 18:8
9
Solved
Q) How do I convert the following observable to a promise so I can call it with .then(...)?
My method I want to convert to a promise:
this._APIService.getAssetTypes().subscribe(
assettypes =>...
Lotuseater asked 21/4, 2016 at 18:7
3
Well, I spent a lot of time looking for help for this problem but nothing worked for me.
I'm getting an Array of Objects from my provider:
this.encarteProvider.getProdutosEncarte('encarte1').subsc...
Hafer asked 3/8, 2017 at 23:40
9
Solved
I am learning iOS Programming with Swift and SwiftUI. I know very little and I am very confused about the difference between a @State and a @Binding.
If I understood it correctly, @Binding is just ...
Morril asked 9/12, 2019 at 10:45
6
Solved
I am using the mat-table and I am trying to use the MatTableDataSource with an observable (I get the data from a web service), but I don't know how to configure the MatTableDataSource to use an obs...
Unsay asked 3/9, 2019 at 11:6
3
Solved
I'm currently trying to display an admob banner in my app, However there are two pages where I would not like the banner displayed (For now i'm testing with just the settings route), And calling di...
Fash asked 23/6, 2020 at 22:43
2
Solved
I am using NestJS to essentially proxy a request to another api using the HttpService (an observable wrapped Axios library). For example:
return this.httpService.post(...)
.pipe(
map(response =...
Edlyn asked 9/4, 2019 at 21:33
2
Solved
I'm new to Nestjs, Typescript and basically backend development. And I'm working on a simple Weather app, where I fetch weather data from Open Weather API.
I'm using Nest built-in HttpModule which ...
Lynnelynnea asked 10/12, 2020 at 16:48
3
Solved
I am using Angular 7 where I am trying to catch an error thrown because a value returned by the external api had null values where I expected values.
I can't seem to figure out what I am supposed...
Logwood asked 28/3, 2019 at 14:41
1 Next >
© 2022 - 2024 — McMap. All rights reserved.