Meteor/Iron-Router - How pass values from RouteController to template helper

Viewed 7976

If I have a route controller as follows:

add_departmentController = RouteController.extend({
    before: function(){
        var a = this.params._id;
        var b = 'abc'; 
    }
});

How can I access these values in a helper for the template

Template.add_department.helpers({
    SomeProperty: function () {
        //Here I need access to a or b from above
        //Would also be nice to access 'this' directly eg. this.params
    },
});
2 Answers
Related