How to use multiple helpers in handlebars
handlebars.js, helper, nested
Solution
Handlesbars supports Subexpressions now, so you could just do:
{{i18n (toLowerCase status) }}
(notice, those are parens `()`, not curly braces `{}`, for the inside helper)
Problem
I have written two helpers namely `i18n` and `toLowerCase` as following: ``` /* * Returns lowercase of a string */ Handlebars.registerHelper('toLowerCase', function(value) { if (value && typeof value === 'string') { return value.toLowerCase(); } else { return ''; } }); ``` I have a string which should be converted to lowercase first and then should be localized using i18n helper. Both these helpers work/run fine. These lines are working fine. (Tested) ``` {{toLowerCase status }} {{i18n status}} ``` But I want something like this.I have tried this: ``` {{i18n {{toLowerCase status }} }} ``` But this throws syntax error as Uncaught Error: Parse error on line 88: ``` ..div> {{ i18n {{toLowerCase stat ----------------------^ Expecting 'CLOSE', 'CLOSE_UNESCAPED', 'STRING', 'INTEGER', 'BOOLEAN', 'ID', 'DATA', 'SEP', got 'OPEN' ``` Any suggestions ?