Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

$eventToObservable example references old version of API #140

Open
robations opened this issue May 19, 2016 · 0 comments
Open

$eventToObservable example references old version of API #140

robations opened this issue May 19, 2016 · 0 comments

Comments

@robations
Copy link

https://github.com/Reactive-Extensions/rx.angular.js/tree/master/docs#eventtoobservableeventname

I'm in the process of upgrading from an earlier version of the component. After cross-checking in the source code, I see that if you want to use data.event or data.additionalArguments you need to pass in a "selector" function that maps the event arguments to an object of this type:

function mapEvent() {
    return {
        "event": arguments[0],
        "additionalArguments": Array.prototype.slice.call(arguments, 1)
    };
}

I also noticed that the JSDoc explicitly says that the event name is the only argument to be provided, although it is possible to pass the selector function. I initially thought this was an internal API, but I think perhaps the JSDoc is out of sync?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant