How to create helper in meteor blaze

Posted By : Balraj Singh | 12-Jan-2017

It's too easy to create helper in meteor blaze. Each template has a local dictionary of helpers that are made available to it, and this call specifies helpers to add to the template’s dictionary. In a template helper, the data context is accessible through the this keyword. It’s also important to note that a template helper will inherit its data context from the template itself.

Template.templateName.helpers({
    helperName: function() {
        // your code here
    },
    otherHelperName: function() {
        // your code here
    }
})

Now you can invoke this helper in the template.

{{helperName}}

THANKS

About Author

Author Image
Balraj Singh

Balraj is a creative UI designer with experience and capabilities to build compelling UI designs for Web and Mobile Applications. Balraj likes playing tech Quiz and loves bike riding.

Request for Proposal

Name is required

Comment is required

Sending message..