Can someone give a clear definition together with a simple example that explains what is a "callback hell" for someone who does not know JavaScript and node.js ?  When (in what kind of settings) does the "callback hell problem" occu...
I would like to to something like:  this._myService.doSomething().subscribe(result => {   doSomething() }); .then( () => dosthelse() ) .then( () => dosanotherthing() )   So I would like to chain .then like in promise. How would I do that i...
I've been looking to understand those 3:   Subject, Behavior subject and Replay subject. I would like to use them and know when and why, what are the benefits of using them and although I've read the documentation, watched tutorials and sea...
I used to develop a lot with promise and now I am moving to RxJS. The doc of RxJS doesn't provide a very clear example on how to move from promise chain to observer sequence.  For example, I usually write promise chain with multiple steps, like...
I get a RxJS Observable from an httpService which is the actual http from Angular. Now as soon as I get a postive result from that, I want to process the next http Request which I get from this.retrieve(). This is more or less concattening requests...
Say I have an Observable, like so:  var one = someObservable.take(1);  one.subscribe(function(){ /* do something */ });   Then, I have a second Observable:  var two = someOtherObservable.take(1);   Now, I want to subscribe() to two, but I want to m...
I'm pushing observables into an array like such...  var tasks$ = []; tasks$.push(Observable.timer(1000)); tasks$.push(Observable.timer(3000)); tasks$.push(Observable.timer(10000));   I want an Observable that emits when all tasks$ have completed....
I'm trying to use RxJS to write a script to process several hundreds of log files, each of which is about 1GB. The skeleton of the script looks like  Rx.Observable.from(arrayOfLogFilePath) .flatMap(function(logFilePath){    return Rx.Node.fromRea...
On the Angular 2 documentation page for using the Http service, there is an example.  getHeroes (): Observable<Stuff[]> {   return this.http.get(this.url)                   .map(this.extractData)                   .catch(this.handleError); }...
I am trying to call to a service on input key-up event.  The HTML  <input placeholder="enter name" (keyup)='onKeyUp($event)'>   Below is the onKeyUp() function  onKeyUp(event) {     let observable = Observable.fromEvent(event.ta...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.