Giter Club home page Giter Club logo

rxjs-jquery's People

Contributors

blast-hardcheese avatar cburgdorf avatar kae avatar mattpodwysocki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rxjs-jquery's Issues

The subscribe magic disappeared

$(document)
    .readyAsObservable()
    .flatMap(function(obj) {
        return $.ajaxAsObservable({
            url: 'cityList',
            dataType: 'jsonp'
        });
    })
    .flatMapLatest(function(res) {
        return res.list; // is Arrary
    })
    .reduce(function(acc, x, idx, source) {
        alert(acc); //has data
        return acc + '<div></div>';
    }, '')
    .subscribe(function(x) {
            alert(x); //Does not perform
        }, function(err) {
            alert(err); //Does not perform
        },
        function() {
            alert('Completed'); //Does not perform
        });

Bring back toObservable

Is it intentional that toObservable has gone? Can we just add it as an alias for bindAsObservable(). This looks really verbose to my eyes.

keyupAsObservable() gives error: Uncaught TypeError: Object #<AnonymousObservable> has no method 'publish'

I tried to use rxjs-jquery to implement the auto-complete example, but I receive the error

Uncaught TypeError: Object #<AnonymousObservable> has no method 'publish'

when calling keyupAsObservable() on the text input that I selected using JQuery.

Here's a JS Fiddle that reproduces the problem for me in Chrome and Safari (open the web inspector / console to see the error): http://jsfiddle.net/JoshRosen/z93hB/1/

Am I using incompatible versions of rxjs, rxjs-jquery, or jquery, or is this a bug?

[Bower][Browserify] Error: Cannot find module 'rx' from .... rxjs-jquery

When I use bower and browserify and run karma, browserify complain that cannot resolve rxjs-jquery dependency. It looks like there is a bug in a commonjs packaging for bower.

Here is the error which I'm getting:

rscheibinger@rscheibinger-Precision-T5600:~/code/hackweek/ebay-ui-text-input-widget$ karma start karma.conf.js 
INFO [karma]: Karma v0.12.28 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 39.0.2171 (Linux)]: Connected on socket 4WtE0D5OBm8TfLrs07Zz with id 8946935
ERROR [framework.browserify]: bundle error
ERROR [framework.browserify]: Error: Cannot find module 'rx' from '/home/rscheibinger/code/hackweek/ebay-ui-text-input-widget/bower_components/rxjs-jquery'
Chrome 39.0.2171 (Linux) ERROR
  TEST RUN WAS CANCELLED because this file contains some errors:
    /tmp/06ce568170248657aa57dcd3d75bce509482bd15.browserify

I work on Linux machine.

value.data.length returns undefined.

Tried this on IE 10 and the latest Chrome but value.data.length is returning as undefined. Value.data does contain two items. index 0 is the search text and index 1 is the results.

compatibility RxJS 4 vs 5

Hi. rxjs-jquery does not work with latest RxJS 5 I reckon.

It tries to refer Rx.Disposable.empty and gets Cannot read property 'empty' of undefined cause it's been replaced with Rx.Subscription. Expect to see more errors. Version 5 brought some major API changes.

Please consider providing proper rxjs dependency version. Looking forward to heaving your lib working with rx ver 5.

Best regards

Wrong object passed to onNext for some functions

Looking at the source of rx.jquery.js there is intention of passing the jQuery object through the observable when it triggers, but there is some mismanagement of 'this' causing it to be the DOM element passed through and not the intended and expected jQuery object.

handeAnimation (note the misspelling) should be passing jQueryProto to the subject.onNext call, and not 'this'

proto.animateAsObservable should capture 'this' to a local and that local passed to the subject.onNext call inside the complete callback.

proto.fadeToAsObservable should do the same thing as above

leaking handlers?

Do these methods leak handlers when a DOM element is destroyed? I see that they return disposables, so the observer can unsubscribe. But I don't see a way for the observable to complete the stream when the DOM element is destroyed.

Deferred toObservable unavailable

Is there a usage example for Deferred.toObservable? rxjs-jquery attempts to modify the prototype for $.Deferred, but $.Deferred returns an object literal. Deferred.prototype is not involved, so the function is unavailable on deferred objects. It can still be called like

$.Deferred.prototype.toObservable.call(deferred)

but I doubt that this is the expected usage.

Perhaps the prototype extension works with particular versions of jquery. Is there a list of supported jquery versions?

npm version leads to crash

I found two versions on npm: rx-jquery and rxjs-jquery. Both lead to a crash!

[email protected]

npm install rx-jquery

Call require('rx-jquery') results in:

.../node_modules/rx-jquery/rx.jquery.js:84
    }  if (!!proto.on) {
                  ^
TypeError: Cannot read property 'on' of undefined
    at .../node_modules/rx-jquery/rx.jquery.js:84:19
    at observable (.../node_modules/rx-jquery/rx.jquery.js:13:26)
    at Object.<anonymous> (.../node_modules/rx-jquery/rx.jquery.js:17:2)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (.../node_modules/rx-jquery/rx.jquery.node.js:2:1)

[email protected]

npm install rxjs-jquery

Call require('rxjs-jquery') results in:

.../node_modules/rxjs-jquery/rx.jquery.js:22
        observable = root.Observable,
                         ^
TypeError: Cannot read property 'Observable' of undefined
    at .../node_modules/rxjs-jquery/rx.jquery.js:22:26
    at $ (.../node_modules/rxjs-jquery/rx.jquery.js:13:26)
    at Object.<anonymous> (.../node_modules/rxjs-jquery/rx.jquery.js:17:2)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (.../tmp.js:3:11)

bower install for 1.1.1 fails

Installing the newest version through bower fails for 1.1.1 with "Package rx not found". It works fine for 1.0.1.
I think the dependency package name should be rxjs, but bower info rxjs-jquery shows:

dependencies: {
  rx: '*'
}

Problems in the samples

Hi, great work here, but the examples not working correctly, I try to use the "AutoComplete.html" sample.

First, is a error in a url.. Find by "http//" in html document.

Second, is a error in execution, I don't know if is a version of Rx, but the error is here:
"function observableCreateRefCount(subscribe) {
return observableCreate(subscribe).publish().refCount();
}"

The object does not support property or method "publish".

Samples are used to motivate new developers..

Observables returned from onAsObservable and oneAsObservable only work for first subscription

Code like this does not work correctly:

var o = $("#some-element").onAsObservable("click");

o.subscribe(handler).dispose();
o.subscribe(handler); // <-- event handler gets registered incorrectly

The cause is the args.push(handler) call that happens on every subscription and thus starts accumulating junk that messes up the call to the jQuery method.

args needs to get reset back to a clean copy of arguments on each subscription.

Documentating in Wiki

As #26 say, I am interested in RxJS and think it meets my company's needs, but I do not know how to use it.
Please please please add some documentation to the Wiki, examples would be nice too.
Thanks ;-)

bindAsObservable and others do not support extraParameters

$(...).bind('eventType', function (ev, a, b) { })
      .trigger('eventType', [ 'val1', 'val2' ]);

will pass 'val1' and 'val2' as the 2nd and 3rd argument to the event handler. bindAsObservable() (and other "AsObservable" versions) only captures the event object. Could these methods be changed to add the additional arguments as a property on the event object? Something like this in the handler: eventObject.additionalArguments = arguments.slice(1);

rxjs-jquery using AMD

I'm trying to use rxjs-jquery with requirejs. When you load jQuery via requirejs, it defines its module id as jquery. However, rxjs-jquery defines its dependency as jQuery. This can be worked around by adding to the require config, but it seems like it would be cleaner if rxjs-jquery just used the correctly cased module id (jquery) instead.

Thanks

bower install not working

when i try
"bower install rx-jquery" i get the error message:

"bower ENOTFOUND Package rx-jquery not found"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.