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

TypeScript material.MdDialogRef类代码示例

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

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



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

示例1: codepeerRunInfo

    public codepeerRunInfo(): Observable<boolean> {
        let dialogRef: MdDialogRef<CodepeerRunInfoDialog>;

        dialogRef = this.dialog.open(CodepeerRunInfoDialog);

        return dialogRef.afterClosed();
    }
开发者ID:AdaCore,项目名称:gnatdashboard,代码行数:7,代码来源:codepeer-dialog.service.ts


示例2: confirm

    public confirm(
      title: string,
      message: string,
      btnOkText: string = 'Продовжити',
      btnCancelText: string = 'Відмінити',
      viewContainerRef?: ViewContainerRef): Observable<boolean> {

        // Docs: https://material.angular.io/components/component/dialog
        // http://www.madhur.co.in/blog/2017/03/26/angular-confirmation-dialog.html

        let dialogRef: MdDialogRef<DialogComponent>;
        const dialogConfig = new MdDialogConfig();
        // FIXME dialogConfig.viewContainerRef = viewContainerRef;

        dialogRef = this.dialog.open(DialogComponent, dialogConfig);

        dialogRef.componentInstance.title = title;
        dialogRef.componentInstance.message = message;
        dialogRef.componentInstance.btnOkText = btnOkText;
        dialogRef.componentInstance.btnCancelText = btnCancelText;

        const result = dialogRef.afterClosed();

        return result;
    }
开发者ID:rostag,项目名称:bigpolicy_eu,代码行数:25,代码来源:dialog.service.ts


示例3: reviewHistory

    public reviewHistory(): Observable<boolean> {
        let dialogRef: MdDialogRef<ReviewHistoryDialog>;

        dialogRef = this.dialog.open(ReviewHistoryDialog);

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


示例4: confirm

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

        let dialogRef: MdDialogRef<SimpleDialogComponent>;

        dialogRef = this.dialog.open(SimpleDialogComponent);
        dialogRef.componentInstance.title = title;
        dialogRef.componentInstance.message = message;

        return dialogRef.afterClosed();
    }
开发者ID:ultrarunner,项目名称:ultrarunner.github.io,代码行数:10,代码来源:dialog.service.ts


示例5: confirm

    confirm(viewContainerRef: ViewContainerRef, options?: Object) {
        let dialogRef: MdDialogRef<DialogConfirmComponent>;

        let config = new MdDialogConfig();
        config.viewContainerRef = viewContainerRef;

        dialogRef = this.dialog.open(DialogConfirmComponent, config);

        Object.assign(dialogRef.componentInstance, options);

        return dialogRef.afterClosed();
    }
开发者ID:garage-it,项目名称:SmartHouse-frontend,代码行数:12,代码来源:dialog.service.ts


示例6: deleteProduct

  deleteProduct(product: any) {
    let dialogRef = this.dialog.open(DeleteDialogComponent);
    dialogRef.afterClosed().subscribe(result => {
      this.selectedOption = result;
      if (this.selectedOption === 'delete') {
        this.db.object('/products/' + product.key).remove();
        if (product.category) {
          this.db.object('/categories/' + product.payload.val().category + '/products/' + product.key).remove();
        }

        // if (product.thumbnail) {
        //   let storage = firebase.storage();
        //   let imageRef = storage.refFromURL(product.thumbnail);
        //   let me = this;
        //   imageRef.delete().then(function() {
        //     let snackBarRef = me.snackBar.open('Product deleted', 'OK!', {
        //       duration: 3000
        //     });
        //   }).catch(function(error) {
        //     console.log('error', error);
        //   });
        // } else {
          let snackBarRef = this.snackBar.open('Product deleted', 'OK!', {
            duration: 3000
          });
        // }
      }
    });
  }
开发者ID:mogeta,项目名称:firebase-cms,代码行数:29,代码来源:admin-products.component.ts


示例7: closeModal

 closeModal() {
   const data = {
     ambulance: {},
     valid: false
   };
   this.dialogRef.close(data);
 }
开发者ID:manuelao-s4ds,项目名称:Emergencies-ui,代码行数:7,代码来源:modal-edit-ambulances.component.ts


示例8: update

 update() {
   const data = {
     ambulance: {},
     error: {},
     valid: false
   };
   debugger
   if (this.formAmbulance.valid) {
     const ambulance = {
       _id: this.data._id, 
       car: this.formAmbulance.get('car').value,
       car_plate: this.formAmbulance.get('car_plate').value,
       type_ambulance: this.formAmbulance.get('type_ambulance').value,
       available: this.formAmbulance.get('available').value
     };
     this.formAmbulance.reset({
       car: '',
       car_plate: '',
       type_ambulance: '',
       available: ''
     });
     data.ambulance = ambulance;
     data.valid = true;
     this.dialogRef.close(data);
   }else {
     this.errorMessage = 'Los campos marcados con * son obligatorios';
   }
 }
开发者ID:manuelao-s4ds,项目名称:Emergencies-ui,代码行数:28,代码来源:modal-edit-ambulances.component.ts


示例9: update

 update() {
   const data = {
     emergency: {},
     error: {},
     valid: false
   };
   if (this.formEmergency.valid) {
     const emergency = {
       _id: this.data._id,
       date: this.formEmergency.get('date').value,
       type_emergency: this.formEmergency.get('category').value,
       driver: this.driverSelected,
       ambulance: this.ambulanceSelected,
       paramedic: this.paramedicsSelected,
       patient: this.patients,
       location: this.data.location
     };
     this.formEmergency.reset({
       driver: '',
       ambulance: '',
       paramedics: ''
     });
     data.emergency = emergency;
     data.valid = true;
     this.dialogRef.close(data);
   }else {
     this.errorMessage = 'Los campos marcados con * son obligatorios';
   }
 }
开发者ID:manuelao-s4ds,项目名称:Emergencies-ui,代码行数:29,代码来源:modal-edit-emergencies.component.ts


示例10: closeModal

 closeModal() {
   const data = {
     paramedic: {},
     valid: false
   };
   this.dialogRef.close(data);
 }
开发者ID:manuelao-s4ds,项目名称:Emergencies-ui,代码行数:7,代码来源:modal-edit-paramedics.component.ts



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
TypeScript material.MdIconRegistry类代码示例发布时间:2022-05-28
下一篇:
TypeScript material.MdDialogModule类代码示例发布时间: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