Joined December 2013
·

Cassio Cabral

João Pessoa
·
·
·

Posted to Active links in Meteor over 1 year ago

I'm using this code from discover Meteor book and is working fine for me.

Handlebars.registerHelper('activeRouteClass', function () {/* routes names */
var args = Array.prototype.slice.call(arguments, 0),
    active;
args.pop();

active = _.any(args, function (name) {
    return Router.current().route.name === name;
});
if (active) {
    return 'active';
}
return '';
});

Is just call this with the route name.

Achievements
162 Karma
25,975 Total ProTip Views