Search code examples
javascriptmeteoriron-router

How to reload the current route after configuration change?


Some times I need to change the layoutTemplate in IronRouter dynamicly, but after I change that using Router.configure({ layoutTemplate: <a new layout> });, it does not take effect immediately. It only works after going to other path/route.

Is there a way to reload current Route?


Solution

  • This uses non-public methods, so the API could potentially change, but as things stang it will re-flow the current route:

    Router.current()._computation.invalidate()