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


TypeScript MdDialogRef.close方法代码示例

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


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

示例1: closeModal

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

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

示例3: closeModal

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

示例4: closeModal

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

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

示例6: update

 update() {
   const data = {
     paramedic: {},
     error: {},
     valid: false
   };
   if (this.formParamedics.valid) {
     const paramedic = {
       _id: this.data._id,
       name: this.formParamedics.get('name').value,
       lastname: this.formParamedics.get('lastname').value,
       phone: this.formParamedics.get('phone').value,
       cellPhone: this.formParamedics.get('cellPhone').value,
       gender: this.formParamedics.get('gender').value,
       birthdate: this.formParamedics.get('birthdate').value,
       specialization: this.formParamedics.get('specialization').value
     };
     data.paramedic = paramedic;
     data.valid = true;
     this.dialogRef.close(data);
   }else {
     this.errorMessage = 'Los campos marcados con * son obligatorios';
   }
 }
开发者ID:manuelao-s4ds,项目名称:Emergencies-ui,代码行数:24,代码来源:modal-edit-paramedics.component.ts

示例7: closeDialog

 closeDialog(res = 0) {
     this.dialogRef.close(res);
 }
开发者ID:rjsaci,项目名称:rjsaci.github.io,代码行数:3,代码来源:delete-dialog.component.ts

示例8:

 (task: TaskModel) => {
     this.dialogRef.close(task);
 },
开发者ID:Invis1ble,项目名称:assistant-client,代码行数:3,代码来源:task-form.component.ts

示例9:

this.dataService.save(this.project).subscribe(res => this.dialog.close(res));
开发者ID:kensodemann,项目名称:time-trax,代码行数:1,代码来源:project-editor.component.ts

示例10:

 (category: CategoryModel) => {
     this.dialogRef.close(category);
 },
开发者ID:Invis1ble,项目名称:assistant-client,代码行数:3,代码来源:category-form.component.ts


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