本文整理汇总了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);
}
示例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';
}
}
示例3: closeModal
closeModal() {
const data = {
emergency: {},
valid: false
};
this.dialogRef.close(data);
}
示例4: closeModal
closeModal() {
const data = {
ambulance: {},
valid: false
};
this.dialogRef.close(data);
}
示例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';
}
}
示例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';
}
}
示例7: closeDialog
closeDialog(res = 0) {
this.dialogRef.close(res);
}
示例8:
(task: TaskModel) => {
this.dialogRef.close(task);
},
示例9:
this.dataService.save(this.project).subscribe(res => this.dialog.close(res));
示例10:
(category: CategoryModel) => {
this.dialogRef.close(category);
},