RxJs new version brake my samples
-
2012年3月29日 7:54
What with this new RxJs bytes???
Nothing is working with this new bytes???
What was change? where i can find some samples??
I can not find the toObservable method!!!!!?????
Please help!
- 已编辑 Nicolas Rafalowski 2012年3月29日 7:59
全部回复
-
2012年3月29日 8:22
What with this new RxJs bytes???
Nothing is working with this new bytes???
What was change? where i can find some samples??
I can not find the toObservable method!!!!!?????
Please help!
I will be more specific where is the rxjc.json implementation to do this:
var scroller = el.toObservable('scroll').Throttle(50); scroller.Subscribe(function () { loadVisiblePages(el); });
- 已建议为答案 Matt Podwysocki 2012年3月29日 18:53
- 取消建议作为答案 Matt Podwysocki 2012年3月29日 18:53
-
2012年3月29日 20:23
What with this new RxJs bytes???
Nothing is working with this new bytes???
What was change? where i can find some samples??
I can not find the toObservable method!!!!!?????
Please help!
I will be more specific where is the rxjc.json implementation to do this:
var scroller = el.toObservable('scroll').Throttle(50); scroller.Subscribe(function () { loadVisiblePages(el); });
In our last release as of December, we changed our operators to be all lower case as to fit with the idioms of JavaScript. This is documented in our Visual Studio Documentation (vsdoc) files that ship with the Reactive Extensions for JavaScript.
In regards to the jQuery specific question, we deprecated the toObservable method on the jQuery Bridges for RxJS in favor of the more idiomatic bindings for events in jQuery. Please refer to our files and documentation on our GitHub site.
Instead of using .toObservable, we now include in rx.jquery.js, the following:
- bind - bindAsObservable
- delegate - delegateAsObservable
- live - liveAsObservable
- on - onAsObservable
- one - oneAsObservable
- <event name> - <event name> asObservable
The method .onAsObservable should be the preferred method as .on is the preferred jQuery method going forward for handling events.
To fix your code to use the latest RxJS, try the following:
var scroller = el.onAsObservable('scroll').throttle(50); scroller.subscribe(function () { loadVisiblePages(el); });Matt
- 已建议为答案 Matt Podwysocki 2012年3月29日 20:23
- 已标记为答案 Nicolas Rafalowski 2012年4月2日 9:55

