History.back () does not work in phonegap ios build

Creating a beautiful little assembly for mobile phones for ios at the moment works fine in the browser, however, when I compile it in Xcode and run in the simulator, using the history.back () file does not work.

I need history.back () to create a back button on every page of the application.

Does anyone know why this might be the case, or an alternative solution.

Additional info: building phonegap using ember js

-2
source share
1 answer

Yes exactly. In several versions of iOS Android (old), history.back () seems to be inoperative. To fix this, you should try this code (I find it in JQM @@ and it works well for everyone)

var nav = window.navigator; if( this.phonegapNavigationEnabled && nav && nav.app && nav.app.backHistory ){ nav.app.backHistory(); } else { window.history.back(); } 
+1
source

Source: https://habr.com/ru/post/971181/


All Articles