本文整理匯總了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()
}