How to equalize value in html using blaze meteor

Posted By : Balraj Singh | 12-Jan-2017

 

Blaze Meteor

If you need equalize some value in html side then you can create a dedicated helper to check if a value is equal to a certain value. 

as Meteor templating system you cannot directly check for an equality in a if statement. you can create a global helper with parameters to check for a string equality or matching string.

{{#if otherHelperToEqualateValue helperName.key}}
    // your html code here
{{/if}}

Need some code in template.js

Template.activeOrders.helpers({
    otherHelperToEqualateValue: function(value) {
        // you check your condition here and return true or false accordingly         
    }
});

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..