concept close callback function in category nativescript
appears as: close callback function, The close callback function

This is an excerpt from Manning's book NativeScript in Action.
In an earlier chapter, you learned about navigating between pages, so the
showModal()should seem familiar, but the close callback function is something new.
Listing 11.7 Responding to the shownModally event of the selectDate-page page
var closeCallback; exports.onShownModally = function(args) { #1 closeCallback = args.closeCallback; #1 }; #1 #1 when the modal is shown, you have access to the close callback function, be sure to save a reference to itWhen the modal page is shown, you have access to the close callback function through a property named closeCallback. We saved a reference to this method so we can call it when we’re finished.