Meteor breadcrumb

前端 未结 2 1434
清酒与你
清酒与你 2021-02-10 00:59

How do I implement a reactive breadcrumb with Meteor and iron-router?

Now I\'m looking for the current path, triggered by a reactive session variable and then adding eac

2条回答
  •  攒了一身酷
    2021-02-10 01:16

    With Meteor 1.0 and Iron.Router it would be:

    Template.breadcrumbs.helpers({
      path: function() {
        return Router.current().route.path(this).split( "/" );
      }
    });
    

    Note that the way of adding methods to the template engine Template.breadcrumbs.path = function() {} is deprecated.

提交回复
热议问题