當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript MatDialogRef.afterClosed方法代碼示例

本文整理匯總了TypeScript中@angular/material.MatDialogRef.afterClosed方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript MatDialogRef.afterClosed方法的具體用法?TypeScript MatDialogRef.afterClosed怎麽用?TypeScript MatDialogRef.afterClosed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在@angular/material.MatDialogRef的用法示例。


在下文中一共展示了MatDialogRef.afterClosed方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

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

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

示例4: openAddress

 openAddress(address?: AddressModel): Observable<boolean> {
   this.dialogRef = this.dialog.open(AddressComponent,
     {
       disableClose: true, backdropClass: 'light-backdrop',
       width: '720px',
       data: address,
     });
   return this.dialogRef.afterClosed();
 }
開發者ID:RIntegerB2B,項目名稱:ArifBuyer,代碼行數:9,代碼來源:address.service.ts

示例5: showNewDialog

  showNewDialog(): void {
    this.newPermissionDialogRef = this.dialog.open(PermissionNewDialogComponent);

    this.newPermissionDialogRef.afterClosed().subscribe((data) => {
      if (data) {
        this.openEditorWithNew(new Permission({ level: data.level }));
      }
    });
  }
開發者ID:LeafCoders,項目名稱:cordate,代碼行數:9,代碼來源:permission.component.ts

示例6: init

 init(title: string, observable: Observable<Array<IdModel>>, onSelected: (item: IdModel) => void): void {
   this.title = title;
   observable.subscribe(items => this.items = items);
   this.dialogRef.afterClosed().subscribe((selectedItem: IdModel) => {
     if (selectedItem) {
       onSelected(selectedItem);
     }
   });
 }
開發者ID:LeafCoders,項目名稱:cordate,代碼行數:9,代碼來源:single-select-dialog.component.ts

示例7: openCard

 openCard(address?: CardDetailModel): Observable<boolean> {
   this.dialogRef = this.dialog.open(CardDetailsComponent,
     {
       disableClose: true, backdropClass: 'light-backdrop',
       width: '460px',
       data: address,
     });
   return this.dialogRef.afterClosed();
 }
開發者ID:RIntegerB2B,項目名稱:ArifBuyer,代碼行數:9,代碼來源:card-details.service.ts

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

示例9: init

 init(title: string, message: string, confirmTitle: string, onConfirm: () => void): void {
   this.title = title;
   this.message = message;
   this.confirmTitle = confirmTitle;
   this.dialogRef.afterClosed().subscribe((confirmed: boolean) => {
     if (confirmed) {
       onConfirm();
     }
   });
 }
開發者ID:LeafCoders,項目名稱:cordate,代碼行數:10,代碼來源:confirm-dialog.component.ts

示例10: showNewDialog

 showNewDialog(): void {
   if (this.allowAddNew && !this.newDialogRef) {
     this.newDialogRef = this.dialog.open(AssetNewDialogComponent, { width: '640px', maxWidth: '90vw' });
     this.newDialogRef.componentInstance.assetFolder = this.selectedAssetFolder;
     this.newDialogRef.afterClosed().subscribe(() => {
       this.newDialogRef = undefined
       this.assetsResource.list();
     });
   }
 }
開發者ID:LeafCoders,項目名稱:cordate,代碼行數:10,代碼來源:asset.component.ts


注:本文中的@angular/material.MatDialogRef.afterClosed方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。