var text = document.querySelector('#text');
var inputStream = Rx.Observable.fromEvent(text, 'keyup')
                    .debounceTime(250)
                    .pluck('target', 'value')
                    .switchMap(url => Http.get(url))
                    .subscribe(data => render(data))
 posted on 2017-09-06 21:33  jayruan  阅读(98)  评论(0编辑  收藏  举报