下载APP w3cschool-编程狮
返回 首页

RxJS 中文文档

开始阅读
手册说明:

静态网页已经成为历史,如今的web设计趋势是预测客户想法并提供更好的互动功能,例如自动填写表单、搜索Wikipedia等。RxJS框架可以很方便地为鼠标和键盘事件提供响应。

示例代码:

var $input = $('#input'),
    $results = $('#results');

/* Only get the value from each key up */
var keyups = Rx.Observable.fromEvent(input, 'keyup')
    .map(function (e) {
        return e.target.value;
    })
    .filter(function (text) {
        return text.length > 2;
    });

/* Now throttle/debounce the input for 500ms */
var throttled = keyups
    .throttle(500 /* ms */);

/* Now get only distinct values, so we eliminate the arrows and other control characters */
var distinct = keyups
    .distinctUntilChanged();
阅读全文
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

RxJS 总览

RxJS 可观察对象
RxJS 观察者模式
RxJS 运算符
RxJS 订阅
RxJS 主题
RxJS排程器

RxJS测试中

RxJS 大理石测试
RxJS 为RxJS贡献测试
RxJS安装
RxJS API清单

RxJS 关于版本6

RxJS v5.x至v6更新指南
RxJS 管道运算符
RxJS 弃用
RxJS 外部资源
RxJS 行为守则

RxJS index

RxJS animationFrame
RxJS ArgumentOutOfRangeError
RxJS asap
RxJS async
RxJS AsyncSubject
RxJS BehaviorSubject
RxJS bindCallback
RxJS bindNodeCallback
RxJS combineLatest
RxJS concat
RxJS config
RxJS ConnectableObservable
RxJS defer
RxJS empty(已弃用)
RxJS EMPTY
RxJS EmptyError
RxJS ErrorObserver
RxJS FactoryOrValue
RxJS CompletionObserver
RxJS forkJoin
RxJS from
RxJS fromEvent
RxJS fromEventPattern
RxJS generate
RxJS GroupedObservable
RxJS identity
RxJS iif
RxJS InteropObservable
RxJS interval
RxJS isObservable
RxJS merge
RxJS MonoTypeOperatorFunction
RxJS never(已弃用)
RxJS NEVER
RxJS NextObserver
RxJS noop
RxJS Notification
RxJS NotificationKind(已弃用)
RxJS ObjectUnsubscribedError
RxJS Observable
RxJS observable
RxJS ObservableInput
RxJS ObservableLike(已弃用)
RxJS ObservedValueOf
RxJS ObservedValuesFromArray
RxJS Observer
RxJS of
RxJS onErrorResumeNext
RxJS Operator
RxJS OperatorFunction
RxJS pairs
RxJS PartialObserver
RxJS partition
RxJS pipe
RxJS queue
RxJS race
RxJS range
RxJS ReplaySubject
RxJS scheduled
RxJS Scheduler(已弃用)
RxJS SchedulerAction
RxJS SchedulerLike
RxJS Subject
RxJS Subscribable
RxJS SubscribableOrPromise
RxJS Subscriber
RxJS Subscription
RxJS SchedulerLike
RxJS TeardownLogic
RxJS throwError
RxJS TimeInterval
RxJS TimeoutError
RxJS timer
RxJS Timestamp
RxJS UnaryFunction
RxJS Unsubscribable
RxJS UnsubscriptionError
RxJS using
RxJS VirtualTimeScheduler
RxJS zip

RxJS operators

RxJS audit
RxJS auditTime
RxJS buffer
RxJS bufferCount
RxJS bufferTime
RxJS bufferToggle
RxJS bufferWhen
RxJS catchError
RxJS CombineAll
RxJS combineLatest(已弃用)
RxJS concat(已弃用)
RxJS concatAll
RxJS concatMap
RxJS concatMapTo
RxJS count
RxJS debounce
RxJS debounceTime
RxJS defaultIfEmpty
RxJS delay
RxJS delayWhen
RxJS dematerialize
RxJS distinct
RxJS distinctUntilChanged
RxJS distinctUntilKeyChanged
RxJS elementAt
RxJS endWith
RxJS every
RxJS exhaust
RxJS exhaustMap
RxJS expand
RxJS filter
RxJS finalize
RxJS find
RxJS findIndex
RxJS first
RxJS flatMap
RxJS groupBy
RxJS ignoreElements
RxJS isEmpty
RxJS last
RxJS map
RxJS mapTo
RxJS materialize
RxJS max
RxJS merge(已弃用)
RxJS mergeAll
RxJS mergeMap
RxJS mergeMapTo
RxJS mergeScan
RxJS min
RxJS multicast
RxJS observeOn
RxJS onErrorResumeNext
RxJS pairwise
RxJS partition(已弃用)
RxJS pluck
RxJS publish
RxJS publishBehavior
RxJS publishLast
RxJS publishReplay
RxJS race(已弃用)
RxJS reduce
RxJS refCount
RxJS repeat
RxJS repeatWhen
RxJS retry
RxJS retryWhen
RxJS sample
RxJS sampleTime
RxJS scan
RxJS sequenceEqual
RxJS share
RxJS shareReplay
RxJS single
RxJS skip
RxJS skipLast
RxJS skipUntil
RxJS skipWhile
RxJS startWith
RxJS subscribeOn
RxJS switchAll
RxJS switchMap
RxJS switchMapTo
RxJS take
RxJS takeLast
RxJS takeUntil
RxJS takeWhile
RxJS tap
RxJS throttle
RxJS throttleTime
RxJS throwlfEmpty
RxJS timeInterval
RxJS timeout
RxJS timeoutWith
RxJS timestamp
RxJS toArray
RxJS window
RxJS windowCount
RxJS windowTime
RxJS windowToggle
RxJS windowWhen
RxJS withLatestFrom
RxJS zip(已弃用)
RxJS zipAll

RxJS ajax

ajax
AjaxError
AjaxRequest
AjaxResponse
AjaxTimeoutTrror

RxJS fetch

fromFetch

RxJS webSocket

webSocket
WebSocketSubject
WebSocketSubjectConfig

RxJS testing

TestScheduler

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }