Skip to content

Instantly share code, notes, and snippets.

View BrianJVarley's full-sized avatar

Brian Varley BrianJVarley

View GitHub Profile
let timeout = 1000;
/**
* Create a custom observable that creates a XHR request and returns complete when the promise is fulfilled
*/
let observable = Rx.Observable.create((o) => {
dataService.fetch('test.json')
.then((data) => {
o.onNext(data);
o.onCompleted();