We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc8080b commit 70730d9Copy full SHA for 70730d9
nativescript-angular/directives/dialogs.ts
@@ -76,19 +76,25 @@ export class ModalDialogService {
76
77
this.location._beginModalNavigation();
78
79
- return new Promise(resolve => {
80
- setTimeout(() => this._showDialog({
81
- containerRef: viewContainerRef,
82
- context,
83
- doneCallback: resolve,
84
- fullscreen,
85
- animated,
86
- stretched,
87
- pageFactory,
88
- parentView,
89
- resolver,
90
- type,
91
- }), 10);
+ return new Promise((resolve, reject) => {
+ setTimeout(() => {
+ try {
+ this._showDialog({
+ containerRef: viewContainerRef,
+ context,
+ doneCallback: resolve,
+ fullscreen,
+ animated,
+ stretched,
+ pageFactory,
+ parentView,
+ resolver,
92
+ type,
93
+ });
94
+ } catch (err) {
95
+ reject(err);
96
+ }
97
+ }, 10);
98
});
99
}
100
0 commit comments