当前位置: 首页>>代码示例>>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;未经允许,请勿转载。