如下图所示:
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLicmbw5SOzADNjJWO5QTY2kjYyEjYyYzY0UzY3QWZiJjY3QmZ18CX5d2bs92Yl1iclB3bsVmdlR2LcNWaw9CXt92Yu4GZjlGbh5yYjV3Lc9CX6MHc0RHaiojIsJye.png)
在unit-list.service.ts的load方法里设置断点:
运行时,可见该load方法是list.service.ts的getData方法触发的:起始的stream是pagination$.
而getData又是何时触发的呢?
答案是listData$这个Observable在unit list Component html上被async pipe 所subscribe时触发的,如图:
cx-org-unit-list
async pipe定义如下:
如下图所示:
在unit-list.service.ts的load方法里设置断点:
运行时,可见该load方法是list.service.ts的getData方法触发的:起始的stream是pagination$.
而getData又是何时触发的呢?
答案是listData$这个Observable在unit list Component html上被async pipe 所subscribe时触发的,如图:
cx-org-unit-list
async pipe定义如下: