How do I reload the current iron:router route?

后端 未结 2 688
轮回少年
轮回少年 2021-01-18 06:43

If I\'m currently at /foo, Router.go \'/foo\' does nothing. I would like /foo\'s action hooks and rendering to be redone. I know I cou

2条回答
  •  日久生厌
    2021-01-18 06:55

    This adds a function Router.rerun() that works:

    login_dep = new Tracker.Dependency
    
    Router.rerun = ->
      login_dep.changed()
    
    Router.configure
      onBeforeAction: ->
        login_dep.depend()
        ...
    

提交回复
热议问题