2 Replies Latest reply on Aug 25, 2016 10:12 PM by arviio

    How to handle page redirection in Phonegap?

    arviio Level 1



      Basically the app is working on a webapp but when ported to Phonegap I encountered issues.


      My app page redirection behavior redirects to url that is defined on a server via nodejs express router


      e.g href="/searching" --> will point to backend routing



      router.get('/searching', ensureAuthenticated, function (req, res) {

        if(sess.userType == 1) {

          res.render('searching'); //which renders searching.html

        } else {






      However, when trying to access that page in phonegap, I'm getting


      file:///android_asset/www/views/searching net::ERR_FILE_NOT_FOUND



      But when I tried replacing the href="searching.html", it works however I lose all my back-end logic since it's not passing there. I'm puzzled how do you handle routing logic with Phonegap? Like what's the logic of it... how should I think in building an end-to-end hybrid app. BTW, I'm using framework7.


      Any hint or advice would really help. Thanks a lot.