當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript NgbActiveModal.close方法代碼示例

本文整理匯總了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);
    }
開發者ID:endeavourhealth,項目名稱:DataChecker,代碼行數:27,代碼來源:uploadCsv.dialog.ts

示例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";
   }    
 }
開發者ID:mostafa17dev,項目名稱:supermarketList,代碼行數:10,代碼來源:bought-input-modal.component.ts

示例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); 
                 });  
 }
開發者ID:andresAste,項目名稱:AndresSites,代碼行數:17,代碼來源:editarPago.component.ts

示例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);
 }
開發者ID:iadgov,項目名稱:WALKOFF,代碼行數:12,代碼來源:execution.variable.modal.component.ts

示例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();
 }
開發者ID:thienban,項目名稱:gestion-du-transport,代碼行數:15,代碼來源:creer-vehicule.component.ts

示例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);
     }
 }
開發者ID:taylorjg,項目名稱:Angular2Dialog,代碼行數:18,代碼來源:nameListItemModalContent.component.ts

示例7:

 .subscribe(data => {
   this.saving = false;
    console.log('Snippet assigned to idea: ' + data.idea_snippet_id);
    this.activeModal.close('Snippet saved.');
 },
開發者ID:Coppia,項目名稱:web,代碼行數:5,代碼來源:snippet-modal.component.ts

示例8: okModal

 okModal() {
   this.activeModal.close('Y');
 }
開發者ID:rahulsingh0394,項目名稱:csquare_ui,代碼行數:3,代碼來源:common-modal.component.ts

示例9:

 (image) => this.modalInstance.close(image),
開發者ID:Ke1R0,項目名稱:koroljuk-portfolio-dev,代碼行數:1,代碼來源:gallery-image-edit.component.ts

示例10: onSubmit

 async onSubmit () {
   const formModel = this.form.value
   await this.projectsService
     .createProject(formModel.name)
   this.activeModal.close()
 }
開發者ID:ChristosGeorgiou,項目名稱:balance,代碼行數:6,代碼來源:create-project.component.ts


注:本文中的@ng-bootstrap/ng-bootstrap.NgbActiveModal.close方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。