Is it possible to plug in an Observable
into a rxjs Subject
?
In Bacon i can plug in a new stream easily with the plug
method, but in rxjs I haven't find a one-liner yet. so now I do it like this:
var subject = new Rx.Subject();
var clickStream = new Rx.Observable.fromEvent(button, 'click');
clickStream.subscribe(function(e){
subject.onNext(e);
});
I can't use merge
, because I render this button later. I would expect a method exists like this:
subject.plug(clickStream);
Thanks B.