[SOLVED] [V2]popup router failed to execute view load event

routes=[
 path: '/popup-content/',
    popup: {
      componentUrl:'./popup-component.html',
      on: {
        pageAfterIn: function (e, page) {
          // Unable to execute
        },
        pageInit: function (e, page) {
          // Unable to execute
        },
      }
    }]

Hey,
when you want to listen for popup-events, you should use

on: {
open: function (popup) {
//executes while opening
  console.log('Popup open');
},
opened: function (popup) {
//executes after opened
  console.log('Popup opened');
}

Same for close/closed function. Check out the Example from the docs.

Router events support only page loading and page events. Modal events are not supported in route config at the moment

Hi there,
is in the component file itself also not supported?
The context for the template works, the console.log on pageMounted not

	return {
	  data: function () {
  		return {'content':'Test'}
	  },
	  on:{
		 pageMounted:function(e,page){
			console.log(page);
		}
   	}
}
{
	path: '/list',
	popup : {
		componentUrl: './pages/list.html',
		on : {
			open : function () {
				alert('123');
			}
		}
	}
},

It’s works!:slight_smile:

In component: open => popupOpen

1 Like

thanks a lot. it works :slight_smile: