close

Page

Closes the current page. onClose event handler will execute before the page closes.

$m.close();

Syntax

        $m.close([destroy])

Parameters

destroy

boolean (optional)

Flag that says if the page is moved to background on close or destroyed. Default value is false.

Remarks

Page is taken to background by default when it is closed. This helps in faster loading of the page again. Pages that are less frequently used can unnecessarily hold memory being in background after close. So set the destroy parameter to get the page destroyed on close.

If user closes the page by pressing back button, then control will not be available to destroy the page. Setting the retainPageInViewStack to false in open method would ensure that the page is destroyed on close.