问题描述
这是一个快速的问题。我已经使用RxJS 5几个月了,而且我遇到了一些我并不理解的行为,因为我无法在任何地方查找它。
So a quick question. I've been using RxJS 5 for a few months now, and I've run into a bit of behavior that I don't really understand, as I haven't been able to look it up anywhere.
我的情况是只用订阅一个可观察链.subscribe();
不会触发observable。
I'm in a situation where subscribing to an observable chain with simply .subscribe();
doesn't trigger the observable.
但是,如果我添加onNext回调(空或不),可观察触发器和链过程: .subscribe(()=> {});
However, if I add an onNext callback (empty or not), the observable triggers, and the chain processes: .subscribe(() => {});
有人可以解释为什么会出现这种情况吗?
Can anyone explain why this behavior happens?
EDIT2 - 删除不相关的示例
EDIT2 - Removed irrelevant example
推荐答案
感谢Damian Hercun告知这是一个现已修复的bug在RxJS 5.4.2。
Thanks to Damian Hercun for informing that this was a now-fixed bug in RxJS 5.4.2.
这篇关于RXJS 5.subscribe()没有参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!