1

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.

Community
  • 1
  • 1
Hardik Vaghani
  • 2,163
  • 24
  • 46

1 Answers1

5

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

page.closeModal();

Reference: here

Dean Le
  • 2,094
  • 13
  • 17
  • Documentation is bit scattered so couldn't find all related methods at one place. – Hardik Vaghani Aug 12 '16 at 10:16
  • 1
    Yeah I know, that's why I always look for API Reference at this link https://docs.nativescript.org/api-reference/globals. I suggest you use it too. Happy coding – Dean Le Aug 12 '16 at 15:52