none
RxJs new version brake my samples

    问题

  • 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!

    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!

    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

    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);
          });
    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);
          });

    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

    2012年3月29日 20:23