[RxJS] Using iif
Using Rxjs
2023-09-14 08:59:12 时间
If you have a popup window, if value is false should close the popup, true is displaying the popup.
But if value is ture, you want to delay 365ms before it open the popup;
If value is false, you want to close the popup right away.
this.isOpen$ = merge( this.closeDialogSubject.asObservable().pipe(mapTo(false)), this.display$.pipe(mergeMap((open: boolean) => iif(() => open, timer(DEBOUNCE_TIME).pipe(mapTo(true)), of(false)))) );
相关文章
- ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
- C++中你不知道的namespace和using的用法
- ORA-26908: XStream API must be executed using a dedicated server process. ORACLE 报错 故障修复 远程处理
- ORA-26924: cannot configure string using “string”.”string” queue because it is used by “string” for string purpose ORACLE 报错 故障修复 远程处理
- ORA-55336: insufficient privileges for using one or more of the models and rules indexes ORACLE 报错 故障修复 远程处理
- ORA-00203: using the wrong control files ORACLE 报错 故障修复 远程处理
- MySQL:Using SELECT to Retrieve Strings(mysql返回字符串)
- exportExporting Data from MySQL Using the STMT Command(stmtmysql)
- Exploring the Benefits of Using Linux FAT File System: A Comprehensive Guide for Beginners(linuxfat)
- 利用MySQL中的Using进行优化查询(mysql 中using)