Using angular SSR howcome, I have to manually trigger a change detection if I use afterNextRender
.
This is after all an angular API.
有人对此有解决办法吗?
afterNextRender(() => {
this.someAPI.then((items) => {
this.items.set(items); // <-- set signal
this.ref.detectChanges(); // <--- trigger change detection
});
});
我不希望API调用在服务器端进行,这就是为什么我使用afterNextRender