I am building an ionic hybrid app. the native app is a simple one page (setting page) with 'go to app' button (it will have login credentials in the future).
The 'go to app' button opens by window.open(,'_self').
window.open('http://127.0.0.1:8991/gringo/index.html#/home', '_self', 'location=yes');
The app on the server is also build with ionic.
I want to close the 'window' from the server and get back the the 'settings page' on the native app.
I've tried so many things for the past 4 hours, and ended with no success.
Any suggestion on how it can be done?
Has anyone encountered this issue?
Thanks in advance.
when you call window.open() like that, the webframe inside the hybrid mobile app will suddenly point to the server website. There's nothing to go back to as the entire html content of your hybrid app has now been replaced with the server website.
The practice to open external websites within your cordova/ionic hybrid app is to use the cordova in-app-browser plugin. This is a good resource for it: https://blog.nraboy.com/2014/07/launch-external-urls-ionicframework/