Global function for Meteor template helper

Viewed 14624

I have registered a global function like this:

Handlebars.registerHelper('dialogBoxOptions', function (callbackFunctionName){
    return {
        callBack: callbackFunctionName
    };
});

but when I try to access it as below I get dialogBoxOptions is not defined

Template.myLlist.helpers({
    dOpt: dialogBoxOptions('dlgCB')
});

I have tried this as a global handlebars helper and a regular javascript function but get the same result.

4 Answers
Related