These are chat archives for cosmaioan/presentation

13th
Nov 2015
cosmaioan
@cosmaioan
Nov 13 2015 12:52

```var source =Observable.zip(
Observable.fromArray(fbids),
Observable.timer(1000, 1000),
function(item, i) { return item;}
)
.map(d=>{ console.log("Arrived "+d); return d;})
.flatMap(facebookId => self.socialEventsService.GetFbEventPromise(facebookId), (id , result) => { return result;}) /// Promise rejected subscription stoped
.retry()
.map(d=> { console.log("Arrived 2222"); return d;})

var subscription = source.subscribe(
function (x) { console.log('onNext: %s', x); console.dir(x) },
function (e) { console.log('onError: %s', e); },
function () { console.log('onCompleted'); self.socialEventsService.getEvents(); });```

var source =Observable.zip(
  Observable.fromArray(fbids),
  Observable.timer(1000, 1000),  
  function(item, i) { return item;}
)
    .map(d=>{ console.log("Arrived "+d); return d;})
    .flatMap(facebookId => self.socialEventsService.GetFbEventPromise(facebookId), (id , result) => { return result;})   /// Promise rejected subscription stoped
        .retry()
    .map(d=> { console.log("Arrived 2222"); return d;})

var subscription = source.subscribe(
  function (x) { console.log('onNext: %s', x); console.dir(x) },
  function (e) { console.log('onError: %s', e); },
  function () { console.log('onCompleted');   self.socialEventsService.getEvents(); });