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


TypeScript modal-dialog.ModalDialogService類代碼示例

本文整理匯總了TypeScript中nativescript-angular/modal-dialog.ModalDialogService的典型用法代碼示例。如果您正苦於以下問題:TypeScript ModalDialogService類的具體用法?TypeScript ModalDialogService怎麽用?TypeScript ModalDialogService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: createModelView

    private createModelView(): Promise<any> {
        const today = new Date();
        const options: ModalDialogOptions = {
            viewContainerRef: this.vcRef,
            context: today.toDateString(),
            fullscreen: false,
        };

        return this.modalService.showModal(ModalViewComponent, options);
    }
開發者ID:KingAndroid,項目名稱:nativescript-sdk-examples-ng,代碼行數:10,代碼來源:sample-modal-page-module-example.ts

示例2: onTap

    // >> opening-modal-page
    onTap(): void {
        const options: ModalDialogOptions = {
            viewContainerRef: this._vcRef,
            context: {},
            fullscreen: true
        };

        this._modalService.showModal(HomeModalViewComponent, options)
            .then((result: string) => {
                console.log(result);
            });
    }
開發者ID:yirony199,項目名稱:nativescript-sdk-examples-ng,代碼行數:13,代碼來源:modal-page-navigation.component.ts

示例3: onRootModalTap

    onRootModalTap(): void {
        const options: ModalDialogOptions = {
            context: {},
            fullscreen: true,
            viewContainerRef: this._viewContainerRefService.root,
        };

        this._modalService.showModal(ModalViewComponent, options)
            .then((result: string) => {
                console.log(result);
            });
    }
開發者ID:NativeScript,項目名稱:nativescript-angular,代碼行數:12,代碼來源:modal-shared-second.component.ts

示例4: show

 public show(fullscreen: boolean) {
     if (this.searchText.trim().length < 3) {
         alert("minimum 3 characters required.");
         return;
     }
     var options: ModalDialogOptions = {
         context: { promptMsg: "find particulars" },
         fullscreen: true
     };
     this.modalService.showModal(DialogContent, options)
         .then((dialogResult: Array<FilterCategory>) => {
             this.filters = dialogResult;
             this.searchItem();
         });
 }
開發者ID:thakurarun,項目名稱:listdown,代碼行數:15,代碼來源:search.component.ts


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