当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript MatDialogRef.close方法代码示例

本文整理汇总了TypeScript中@angular/material.MatDialogRef.close方法的典型用法代码示例。如果您正苦于以下问题:TypeScript MatDialogRef.close方法的具体用法?TypeScript MatDialogRef.close怎么用?TypeScript MatDialogRef.close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@angular/material.MatDialogRef的用法示例。


在下文中一共展示了MatDialogRef.close方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: handleSyncStatus

  private handleSyncStatus(status: DatabaseSyncStatus) {
    switch (status) {
      case DatabaseSyncStatus.started:
        this.syncInProgress = true;
        if (!this._sessionService.isLoggedIn()) {
          this.dialogRef = this.dialog.open(InitialSyncDialogComponent);
        }
        break;
      case DatabaseSyncStatus.completed:
        this.syncInProgress = false;
        if (this.dialogRef) {
          this.dialogRef.close();
        }
        this.alertService.addInfo('Database sync completed.');
        break;
      case DatabaseSyncStatus.failed:
        this.syncInProgress = false;
        if (this.dialogRef) {
          this.dialogRef.close();
        }
        this.alertService.addWarning('Database sync failed.');
        break;

      case DatabaseSyncStatus.pulledChanges:
        this.alertService.addInfo('Updated database from server.');
        this.syncInProgress = true;
        setTimeout(() => this.syncInProgress = false, 1000);
        break;
      case DatabaseSyncStatus.pushedChanges:
        this.syncInProgress = true;
        setTimeout(() => this.syncInProgress = false, 1000);
        break;
    }
  }
开发者ID:NGO-DB,项目名称:ndb-core,代码行数:34,代码来源:sync-status.component.ts

示例2: close

 close(result?: any): void {
   if (result) {
     this._dialogRef.close(result);
   } else {
     this._dialogRef.close();
   }
 }
开发者ID:digitaldeacon,项目名称:memberhive,代码行数:7,代码来源:confirm-dialog.component.ts

示例3: pass

 pass() {
   const date = new Date();
   if (this.option === '1') {
     date.setDate(date.getDate() + 1);
   }
   this.dialogRef.close(date);
 }
开发者ID:FatNinja42,项目名称:parkit,代码行数:7,代码来源:confirm-pass.component.ts

示例4: applySelection

 applySelection() {
   const instance = this.yamcs.getInstance();
   const selectedOption = this.selectionList.selectedOptions.selected[0];
   const newInstance = selectedOption.value;
   this.dialogRef.close();
   if (instance.name !== newInstance) {
     this.router.navigateByUrl(`/monitor/displays/browse?instance=${newInstance}`);
   }
 }
开发者ID:,项目名称:,代码行数:9,代码来源:

示例5: ok

 ok(): void {
   if (this.message && this.message.length > 0) {
     this.dialogRef.close({
       fromName: this.fromUser.fullName,
       fromEmail: this.fromUser.email,
       subject: this.subject,
       message: this.message,
     });
   }
 }
开发者ID:LeafCoders,项目名称:cordate,代码行数:10,代码来源:send-message-dialog.component.ts

示例6:

 onClickListener: (ref: MatDialogRef<DialogComponent>, customData: any) => {
     ref.close({
         customData,
         result: DialogResult.SAVE
     });
 }
开发者ID:pschild,项目名称:image-management-tool,代码行数:6,代码来源:dialog-button-config.ts

示例7: closePopup

 closePopup() {
   this.dialogRef.close();
 }
开发者ID:skycoin,项目名称:skycoin,代码行数:3,代码来源:exchange-history.component.ts

示例8: select

 select(){
     const footer = new LayoutBody();
     this.dialog.close(footer);
 }
开发者ID:meepobrother,项目名称:meepo,代码行数:4,代码来源:layout-body-select.ts


注:本文中的@angular/material.MatDialogRef.close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。