本文整理匯總了TypeScript中nativescript-angular/modal-dialog.ModalDialogService.showModal方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ModalDialogService.showModal方法的具體用法?TypeScript ModalDialogService.showModal怎麽用?TypeScript ModalDialogService.showModal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類nativescript-angular/modal-dialog.ModalDialogService
的用法示例。
在下文中一共展示了ModalDialogService.showModal方法的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);
});
}
示例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);
});
}
示例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();
});
}