Load Page and Routable Popup at the same time

when I visit http://localhost:8080/#!/popup-path/ directly in the browser without initiating it from an already existing pade likd my dashboard, the popup opens correctly with a blank page behind it.

Also when I close the popup ,the url in the browser changes to http://localhost:8080/#!/dashboard/
which is correct, but returns a blank page.

when i manually refresh http://localhost:8080/#!/dashboard/ , the dashboard loads correctly.

But I want my dashboard and popup to load at the same time when I visit http://localhost:8080/#!/popup-path/ with my dashboard behing the popup … Any Help! will Appreciate

{

path: '/dashboard/',

componentUrl: '/static/pages/dashboard.f7.html',

beforeEnter: checkAuth,

options : {

  context: {

    async data() {

              //api request
                   .................

        return {

          data:api_res

        }

    }

  },
  ignoreCache:true,
  reloadAll:true,
  reloadCurrent:true,
  pushState:true, 
  clearPreviousHistory:true

}

},
{

path: '/popup-path/',
popup:{

  async(routeTo, routeFrom, resolve, reject){

    if(is_logged_in == 'true'){

      resolve({ 

        componentUrl: '/static/pages/popup.f7.html',

        beforeEnter: checkAuth,

        options : {

          context: {

            async data() {

              //api request
                   .................

                return {

                  data:api_res

                }

            }

          },ignoreCache:true,reloadCurrent:true

        },        

        on: {

          pageInit: function (e, page) {
            console.log(page.route)
          },

        }

    

      })

    }else{

      resolve({ componentUrl: '/dashboard/' })

    }

  }

}  

},

No, it is not possible by default, how F7 can know that if you load website with http://localhost:8080/#!/popup-path/ it should load something else to View. In your case it probably will make sense to use page instead of popup, or use popup but not routable

Alright !! Thanks !!! F7 is super awesome… I am telling my fellow developers in Ghana - Africa to use it… I salute you Senior Engineer @nolimits4web

1 Like