假设我有这样一个观察点:
public settings$: Observable<
SettingsResponse
> = this._service.getSettings();
然后我得到了:
public ngOnInit(): void {
window.customService.init();
}
由于初始化触发器在observable完成之前触发,除了setTimeout或subscribe to observable并使用非异步属性在window.customService.init()
触发器之前设置模板中的设置之外,还有其他方法可以延迟吗?
https://stackoverflow.com/questions/56449178
复制相似问题