I believe that to get two params properly mapped back to the callback when using Observable.bindCallback
method you have to use the "selector" function, but I cannot find documentation that explains how to do this. I may have a misunderstanding of what the selector function does, but it still should be documented.
http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html#static-method-bindCallback
function testLogin(username, password, callback){
// ...
callback(param1, param2);
}
function selectorFunction(???) {
// ???
}
function onTestLoginComplete(param1, param2) {
// ...
}
var observableFactory = Observable.bindCallback(testLogin, selectorFunction);
var observable = observableFactory('username', 'password');
observable.subscribe( (param1, param2) => onTestLoginComplete(param1, param2) );