How to check for Route through route name in template with Meteor and Iron Router

前端 未结 4 679
你的背包
你的背包 2020-12-14 08:14

What can I use in a template to figure out the route name that is associated with the route that I am currently on?

For example if I configured a route

4条回答
  •  一个人的身影
    2020-12-14 08:33

    iron-router > 1.0

    var routeName = Router.current().route.getName();
    

    iron-router < 1.0

    var routeName = Router.current().route.name;
    

提交回复
热议问题