當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。