How to use comparison operator in {{#if a == b}}?


#1

I want to use any operator in {{#if.........}}.
Have any packages or solution.
help me.


#2

You can’t. Use a helper that does the comparison! Handlebars/Spacebars is pretty bare-bones, doesn’t allow anything that even remotely looks like “code”.


#3

Have any packages to do this?


#4

@theara Have a look at https://atmospherejs.com/raix/handlebar-helpers

Pretty sure you can also register a custom helper.

Check this out: http://stackoverflow.com/questions/22705532/meteor-whats-the-best-way-to-test-equality-of-two-values-like-if-somevar


#5

Look great, but don’t update for along time.