OneComponent和TwoComponent都有" MyHttpService“注入,这取决于MyHttpService返回的数据。 this.myHttpService.grabData() data => {// do something to the data假设即使我在两个组件中都有此订阅,也不会调用<
getCarts返回getCartInformation和getCartCount所需的cart id
问题是,当您调用getCartInformation或getCartCount作为副作用时,您将如何避免对API进行多次getCartInformation调用?您是否可以使用available.Would标志扩展API库,以便fetch***可以在API库上设置一个计数器,即“查询端点时调用”,然后重新触发functions?现在