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) :...
I want to send request using this code (i've tried forkJoin too) with a delay between calls:  duplicateElement(id: string): Observable<any> {     return this.http.get({ routeName: 'route_name', params: { id } }); }  duplicateElement...
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 am making 4 asynchronous api calls  floor.entities.forEach(elementId => {   let objTemp: any = {};    objTemp.main = elementId.name    let currentTempForZone;  //1st async function    this.getCurrentValue(objTemp.main).subscribe((curr) =>...
I use  Angular CLI: 6.0.8   Node: 8.11.3  I just learned Udemy - Angular (Full App) with Angular Material, Angularfire & NgRx. Up on lesson 72 Listening to Value Changes (of_Firestore) I have an error    export class NewTrainingComponent implemen...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.