• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript material.MatDialogRef类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript material.MatIconRegistry类代码示例发布时间:2022-05-28
下一篇:
TypeScript material.MatDialog类代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap