Rxjs subscribe method being ignored

前端 未结 1 564
孤城傲影
孤城傲影 2021-01-27 11:35

BEFORE tagging it as a duplicate, note that None of these worked for me: question 1 / question 2 / question 3

So, after getting a reply to a previous question I started

相关标签:
1条回答
  • 2021-01-27 12:18

    What is happening is formDTOpushing is being called before the components subscribe. This means the components will not receive that value. Components that subscribe to a Subject only receive values that are emitted after they subscribe. (They do not receive a value when they initially subscribe)

    To have the the components receive previous emitted value(s) on subscribe, use a BehaviorSubject or ReplaySubject instead

    0 讨论(0)
提交回复
热议问题