- dematerialize
- 签名:
dematerialize(): Observable
- 签名:
- 将 notification 对象转换成 notification 值。
- 示例
- 示例 1: 将 notifications 转换成值。
- 示例
- 其他资源
dematerialize
签名: dematerialize(): Observable
将 notification 对象转换成 notification 值。

示例
示例 1: 将 notifications 转换成值。
( jsBin |
jsFiddle )
import { from } 'rxjs/observable/from';import { Notification } from 'rxjs/Notification';// 发出 next 和 error 通知const source = from([Notification.createNext('SUCCESS!'),Notification.createError('ERROR!')]).pipe(// 将 notification 对象转换成 notification 值dematerialize())// 输出: 'NEXT VALUE: SUCCESS' 'ERROR VALUE: 'ERROR!'const subscription = source.subscribe({next: val => console.log(`NEXT VALUE: ${val}`),error: val => console.log(`ERROR VALUE: ${val}`)});
其他资源
- dematerialize
- 官方文档
源码: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/demterialize.ts
