Changes in Observable not reflected in View

后端 未结 3 686
没有蜡笔的小新
没有蜡笔的小新 2021-01-19 19:30

I basically followed this guide to implement an Observable data service.

In a store class (ItemsStore), I have my BehaviorSubject which hol

3条回答
  •  借酒劲吻你
    2021-01-19 20:03

    Solved it - and it was a very stupid mistake - shame on me. ItemsStore gets injected in two different classes, and since the Dependency Injection creates an instance for each injection - well, then we have two of the same kind where there should only be one.

    Moving the dependency (ItemsStore) to the global providers array solved the problem.

提交回复
热议问题