Webview navigation into nativscript, interacting with back button


#1

Having a page that only containes a webview.

<Page xmlns="http://www.nativescript.org/tns.xsd" actionBarHidden="true">

    <WebView src="http://example.com/" />

</Page>

press the android back button. Then instead of navigating to the last page inside the webview, the app exits.

how can i solve this ? using Javascript


#2

Got the solution from here: