因为我主要是在angular项目里面用ts....Share Operator
share() 操作符允许多个订阅者共享同一个Observable. 也就是把Cold变成Hot....然后share()就把这个observable从cold变成了hot的.
后边Dave进行了订阅.
2.5秒以后, Nick进行了订阅....下面是一个angular 5的例子:
app.component.html:
从Subject共享Observable到多个Subscribers
<input type="text...(500));
// 输出: 0,1,2,3,4,5,6,<em>7</em>,8,9...0,1,2,3,4,5,6,<em>7</em>,8
const subscribe = example.subscribe(val => console.log