本文整理汇总了TypeScript中@ng-bootstrap/ng-bootstrap.NgbActiveModal.close方法的典型用法代码示例。如果您正苦于以下问题:TypeScript NgbActiveModal.close方法的具体用法?TypeScript NgbActiveModal.close怎么用?TypeScript NgbActiveModal.close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@ng-bootstrap/ng-bootstrap.NgbActiveModal
的用法示例。
在下文中一共展示了NgbActiveModal.close方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: generateCreateTableStatement
private generateCreateTableStatement(csvData) {
let rows = csvData.split('\n');
let fieldList = rows[0].replace(/"/g,'');
let fields = fieldList.split(',');
let sql = '-- DROP TABLE IF EXISTS workspace.' + this.tableName + ';\n\n';
sql += 'CREATE TABLE workspace.' + this.tableName + '(\n';
for (let i = 0; i < fields.length; i++) {
sql += '\t' + fields[i] + ' CHARACTER VARYING(255),\n';
}
sql += '\tCONSTRAINT pk_'+this.tableName+'_'+fields[0]+' PRIMARY KEY ('+fields[0]+')\n';
sql += ');\n\n';
sql += 'INSERT INTO workspace.' + this.tableName + '\n';
sql += '(' + fieldList + ')\n';
sql += 'VALUES';
for (let i = 1; i < rows.length; i++) {
if (i > 1)
sql += ',';
sql += '\n(' + rows[i].replace(/"/g,"'") + ')';
}
sql += ';';
this.activeModal.close(sql);
}
示例2: sendPrice
// send price to parent component
sendPrice(){
if(this.price != null){ // check if the user entered price
this.boughtInputModalService.neededPriceChange.emit(this.price);
this.activeModal.close(); //close modal
}
else if(this.price== null ){
this.errorMessage = "Item Price missing";
}
}
示例3: GuardarCambios
/// *** Event handlers *************************************************
/**
* Guarda los cambios para el pago mensual
*
* @memberOf EditarPagoComponent
*/
GuardarCambios():void {
this.activeModal.close();
const modalRef = this.modalService.open(framework.ProgresoModal);
modalRef.componentInstance.Mensaje = "Guardando pago";
this.planillaService.ActualizarPago(this.PagoMensual)
.subscribe(result => { modalRef.close() },
error => {
modalRef.close();
console.log(error);
});
}
示例4: execute
execute(form: NgForm) : void {
let variables: EnvironmentVariable[] = [];
this.workflow.referenced_variables.forEach(variable => {
if (form.value[variable.id] && form.value[variable.id] != '') {
let newV = new EnvironmentVariable();
newV.id = variable.id;
newV.value = form.value[variable.id];
variables.push(newV);
}
})
this.activeModal.close(variables);
}
示例5: creerVehicule
creerVehicule() {
const newVehicule = new VehiculeSociete(
this.immatriculation.value,
this.marque.value,
this.modele.value,
this.categorie.value,
this.nbPlaces.value,
this.photo.value
);
console.log('publish : ', newVehicule);
this.ds.publishVehicule(newVehicule).subscribe(veh => {
console.log('response to publish : ', veh);
});
this.activeModal.close();
}
示例6: onSubmit
private onSubmit() {
if (this.form.valid) {
const item = this.item
? new NameListItem(
this.firstName,
this.lastName,
this.email,
this.item.id,
this.item.readUri,
this.item.updateUri,
this.item.deleteUri)
: new NameListItem(
this.firstName,
this.lastName,
this.email);
this.activeModal.close(item);
}
}
示例7:
.subscribe(data => {
this.saving = false;
console.log('Snippet assigned to idea: ' + data.idea_snippet_id);
this.activeModal.close('Snippet saved.');
},
示例8: okModal
okModal() {
this.activeModal.close('Y');
}
示例9:
(image) => this.modalInstance.close(image),
示例10: onSubmit
async onSubmit () {
const formModel = this.form.value
await this.projectsService
.createProject(formModel.name)
this.activeModal.close()
}