如何设置Observable.fromEvent以使用jQuery过滤事件

时间:2018-07-07 17:20:31

标签: javascript jquery rxjs

我该怎么做?要了解可观察的

function(button) {
var buttonClicks = Observable.fromEvent(button, "click");


var subscription =
    buttonClicks.
        forEach(function(clickEvent) {
            alert("Button was clicked. Stopping Traversal.");

            subscription.dispose();
        });

}

0 个答案:

没有答案