Open JigneshPatel04 opened 5 years ago
https://stackoverflow.com/questions/8853396/logical-operator-in-a-handlebars-js-if-conditional
You will have to create a block helper for that. handlebars.js doesn't have a built in way to do that.
handlebars-helpers is a package that has a bunch of useful block helpers.
Hello,
I am using nodejs handlebars .
I used input field and i have applied || condition in my code . but error occurred on it. Like as below
Error: Parse error on line 9: ...alue="{{#if editing || hasError }} {{pro -----------------------^ Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'EQUALS', 'OPEN_BLOCK_PARAMS', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', 'SEP', got 'CLOSE_BLOCK_PARAMS' at Parser.parseError (G:\Learning\Course\Node\Maximilian-NodeComplete
Any one idea ?