Hardik Vaghani
Hardik Vaghani

Reputation: 2173

How to close modal popup?

I have a modal popup with custom page in Nativescript. I am calling open popup as below

var modalPageModule = 'components/appointmentDetails/tabs/location/location';
var context = args.context;
var fullscreen = false;
page.showModal(modalPageModule, context, function closeCallback(location, address) {
    
}, fullscreen);

On popup i have a close button from where modal popup should be closed.

But from the reference site i could not find anything helpful method to close modal popup.

enter image description here

Thanks in advance.

Upvotes: 1

Views: 2653

Answers (1)

Dean Le
Dean Le

Reputation: 2094

There is function closeModal() in page module. Just:

page.closeModal();

Reference: here

Upvotes: 5

Related Questions