且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在实际更改模板之前,Iron Router会钩在路线上

更新时间:2023-02-13 22:58:58

基于此答案,这是您的操作方式可以使用Router.onStop()钩住路由器:

Based on this answer, here is how you can hook the router using Router.onStop():

// onStop hook is executed whenever we LEAVE a route
Router.onStop(function(){
  //check if the current route is the page from where you need to show your 
  //popup and show it based on, for instance, a session variable containing 
  //the previously clicked content id.

});