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


TypeScript material.MatDialogRef类代码示例

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


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

示例1: confirm

 public confirm(title: string, message: string, customButton: string): Observable<boolean> {
   let dialogRef: MatDialogRef<AppComfirmComponent>;
   dialogRef = this.dialog.open(AppComfirmComponent, {disableClose: true});
   dialogRef.updateSize('380px');
   dialogRef.componentInstance.title = title;
   dialogRef.componentInstance.message = message;
   dialogRef.componentInstance.customButton = customButton;
   return dialogRef.afterClosed();
 }
开发者ID:joshr4,项目名称:webui,代码行数:9,代码来源:app-confirm.service.ts

示例2: confirm

  confirm(title: string, message: string): Observable<boolean> {
    let dialogRef: MatDialogRef<ConfirmDialogComponent>;

    dialogRef = this._dialog.open(ConfirmDialogComponent);
    dialogRef.componentInstance.title = title;
    dialogRef.componentInstance.message = message;

    return dialogRef.afterClosed();
  }
开发者ID:digitaldeacon,项目名称:memberhive,代码行数:9,代码来源:dialog.service.ts

示例3: login

  login(message?: string): Observable<boolean> {
    let dialogRef: MatDialogRef<LoginDialogComponent>;
    const config: MatDialogConfig = new MatDialogConfig();

    config.disableClose = true;

    dialogRef = this._dialog.open(LoginDialogComponent, config);
    dialogRef.componentInstance.message = message;

    return dialogRef.afterClosed();
  }
开发者ID:digitaldeacon,项目名称:memberhive,代码行数:11,代码来源:dialog.service.ts

示例4: confirm

    public confirm(title: string, message: string, preview?: string): Observable<boolean> {

        let dialogRef: MatDialogRef<ConfirmDialog>;

        dialogRef = this.dialog.open(ConfirmDialog);
        dialogRef.componentInstance.title = title;
        dialogRef.componentInstance.message = message;
        dialogRef.componentInstance.preview = preview;
        //dialogRef.componentInstance.preview = this.sanitizer.bypassSecurityTrustHtml(preview);

        return dialogRef.afterClosed();
    }
开发者ID:intermadix,项目名称:XBMS-webapp,代码行数:12,代码来源:dialogs.service.ts

示例5: close

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

示例6: 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

示例7: open

 public open(title: string = 'Please wait'): Observable<boolean> {
   this.dialogRef = this.dialog.open(
     AppLoaderComponent,
     { disableClose: true,
       backdropClass: 'light-backdrop'
     });
   this.dialogRef.updateSize('200px');
   this.dialogRef.componentInstance.title = title;
   return this.dialogRef.afterClosed();
 }
开发者ID:khex,项目名称:albatroz,代码行数:10,代码来源:app-loader.service.ts

示例8: 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

示例9: open

 public open(title: string = T('Please wait')): Observable<boolean> {
   this.translate.get(title).subscribe(t => {
     this.dialogRef = this.dialog.open(AppLoaderComponent, {disableClose: true});
     this.dialogRef.updateSize('200px', '200px');
     this.dialogRef.componentInstance.title = t;
   });
   return this.dialogRef.afterClosed();
 }
开发者ID:joshr4,项目名称:webui,代码行数:8,代码来源:app-loader.service.ts

示例10: 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,代码来源:


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