Is there any tool or technique to detect "left behind" or "currently alive" observables, subscriptions.  Just recently discovered a pretty nasty memory leak where components were kept alive due to missing "unsubscribe" calls....
I've created a demo (ng-run) where I have a button which invokes an Http request.  When the button is clicked, I invoke this method :   public getData(){  this._jokeService.getData().subscribe(); }   Which in turn invokes this ( from a service) :...
Let's imagine i have a function fetchUser which takes as parameter userId and return an observable of user.   As i am calling this method often, i want to batch the ids to perform one request with multiple ids instead !  Here my troubles began......
i'm trying to create a reusable Modal component. in a ModalService i have a Subject, and a method that that calls next() on the subject. The ModalComponent subscribes to that subject, but whenever the method in the service is being called, the ne...
I want to have an observable that when unsubscribed it calls a function but only when it is unsubscribed without error and without getting to complete. The observable I am trying to build usually gets raced with another observable. I want when the ot...
valueChanges Observable which exists on FormControl object emits value each time setValue(value) function gets called on FormControl object.  Using RxJS operator distinctUntilChanged we can filter out values which aren't new. But this doesn't...
I'm seeing the http request happen - in the Chrome Network tab, and also by using then() within the fetch promise - with the below code, despite never subscribing to the inner observable (saveCourses$).  I modified to use from() rather than fromP...
Suppose I have a directory structure similar to following:  foo | +---one |   +---tmp | +---two | +---three     |     +---tmp   I want to get the list of sub-directories under foo which has a tmp (sub-)sub-directory underneath. I do have the followin...
I have this piece of code where I am trying to capture all the drag events. This code works only for the first drag and stop will not work for successive drags.  Is it because takeUntil cancelling the outer observable? How can I make the code work....
Things I have tried include following where values is array of values of which I want to find the sum.  I have also added necessary functions from rxjs as follows: I get an error saying      typeError: Rx.Observable.from(...).sum is not a function...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.