我认为我应该在特定的用例中利用RXJS。用例是,我有一个订阅,我希望它一直存在,直到某个特定的值从其他地方的某个主题发出。away, this should kill the subscription(s) that cares about <value>
this.kill.next(<value>) 我的方法是缓存订阅,然后在调用带有相关<value>的this.kill.next(<value>)时
this.inputObservable.next(text);getObservable() {}so if I have 'initial text' text showing up in html because inputObservable has null value initiallythat triggers observable and sets 'new text'
现在我