• Node.js & Handlebars: Equals function

    Posted by markzero on Saturday, December 26th, 2015

    Handlebars engine has if conditional commands, but you can’t write “if something == ‘foo'”. But it’s very easy to find your way to write your own functions.

    We can use helpers to write those functions:

    Then in your views you can just use it:

    Posted in: Handlebars, Node.js.

    Share this story:

    Leave a Reply