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


TypeScript NgbModal.open方法代碼示例

本文整理匯總了TypeScript中@ng-bootstrap/ng-bootstrap.NgbModal.open方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript NgbModal.open方法的具體用法?TypeScript NgbModal.open怎麽用?TypeScript NgbModal.open使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在@ng-bootstrap/ng-bootstrap.NgbModal的用法示例。


在下文中一共展示了NgbModal.open方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: openConfirmCompleteAllModal

 openConfirmCompleteAllModal(confirmCompleteAllModal): void {
   this.modalService.open(confirmCompleteAllModal).result.then((result) => {
     if ('yes' === result) {
       this.listService.completeAllItems();
     }
   });
 }
開發者ID:zmad5306,項目名稱:grocery-list,代碼行數:7,代碼來源:list.component.ts

示例2: openConfirmCompleteModal

 openConfirmCompleteModal(confirmCompleteModal): void {
   this.modalService.open(confirmCompleteModal).result.then((result) => {
     if ('yes' === result) {
       this.listService.completeItems(this.department);
     }
   });
 }
開發者ID:zmad5306,項目名稱:grocery-list,代碼行數:7,代碼來源:list.component.ts

示例3: open_modal

  private open_modal(content) {
    this.ngbModalService.open(content).result.then((result) => {

    }, (reason) => {
        console.log(reason);
    });
  }
開發者ID:thluiz,項目名稱:sam,代碼行數:7,代碼來源:move-card-modal.component.ts

示例4: openDatasetHistoryModal

 openDatasetHistoryModal(dataset: Dataset, sessionData: SessionData) {
   const modalRef = this.ngbModal.open(DatasetHistorymodalComponent, {
     size: "lg"
   });
   modalRef.componentInstance.dataset = dataset;
   modalRef.componentInstance.sessionData = sessionData;
 }
開發者ID:chipster,項目名稱:chipster-web,代碼行數:7,代碼來源:datasetmodal.service.ts

示例5: openDeleteCollectionModal

 private openDeleteCollectionModal(content) {
     this.modalService.open(content).result.then((result) => {
         if(result == 'confirm')
             this.deleteCollection();
     }, (reason) => {
     });
 }
開發者ID:OlivierCoue,項目名稱:invow,代碼行數:7,代碼來源:tc-collection-detail.component.ts

示例6: staticModalShow

 staticModalShow() {
   const activeModal = this.modalService.open(DefaultModal, {size: 'sm',
                                                             backdrop: 'static'});
   activeModal.componentInstance.modalHeader = 'Static modal';
   activeModal.componentInstance.modalContent = `This is static modal, backdrop click
                                                   will not close it. Click × or confirmation button to close modal.`;
 }
開發者ID:AlbertXingZhang,項目名稱:ng2-admin,代碼行數:7,代碼來源:modals.component.ts

示例7: deploy

    deploy() {
        let deployed: boolean = true;

        // close the draw as we no longer need it
        this.activeDrawer.close();
        const confirmModalRef = this.modalService.open(ReplaceComponent);
        confirmModalRef.componentInstance.mainMessage = 'Your Business Network Definition currently in the Playground will be removed & replaced.';
        confirmModalRef.componentInstance.supplementaryMessage = 'Please ensure that you have exported any current model files in the Playground.';
        confirmModalRef.componentInstance.resource = 'definition';
        return confirmModalRef.result.then((result) => {
            if (result === true) {
                this.deployInProgress = true;
                return this.sampleBusinessNetworkService.updateBusinessNetwork(this.currentBusinessNetwork);
            } else {
                deployed = false;
            }
        })
            .then(() => {
                this.deployInProgress = false;
                this.finishedSampleImport.emit({deployed: deployed});
            })
            .catch((error) => {
                this.deployInProgress = false;
                this.alertService.errorStatus$.next(error);
                this.finishedSampleImport.emit({deployed: false, error: error});
            });
    }
開發者ID:bloonbullet,項目名稱:composer,代碼行數:27,代碼來源:update.component.ts

示例8:

  private openModal<T extends ModalDialog<TResult>, TResult>(settings: IModalSettings<T, TResult>): void
  {
    const modalRef: NgbModalRef = this.modalService.open(settings.type);
    const component: T = modalRef.componentInstance;

    const reportResult = (res) =>
    {
      console.log(`dialog result:`, res);

      if (res)
      {
        settings.onSuccess(res);
      }
    };

    const reportFailure = (reason) =>
    {
      if (reason)
      {
        console.log('dialog failed:', reason);
      }
    };

    if (settings.init)
      settings.init(component);

    modalRef.result
      .then(reportResult)
      .catch(reportFailure);
  }
開發者ID:twop,項目名稱:SlopFlow.Editor,代碼行數:30,代碼來源:dialog.service.ts

示例9: open

 open(content, level: number) {
   this.level = level;
   this.checklistService
     .getChecklist(level)
     .subscribe(checklistItems => { this.checklistItems = checklistItems });
     this.modalService.open(content, { size: 'lg' })
 }
開發者ID:rlilojr,項目名稱:skf-flask,代碼行數:7,代碼來源:checklist.component.ts

示例10: openContactSupportModal

   openContactSupportModal(log = null) {
   const modalRef = this.modalService.open(ContactSupportModalComponent, {
       size: "lg",
       backdrop: "static", // don't close on backdrop click
   });
   modalRef.componentInstance.log = log;
 }
開發者ID:chipster,項目名稱:chipster-web,代碼行數:7,代碼來源:contact-support.service.ts


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