Is it possible to nest helpers inside the options hash with handlebars?

mateusmaso picture mateusmaso · Feb 8, 2013 · Viewed 34.5k times · Source

For instance, is there a way to nest my "i18n" helper inside another helper's hash variable?

{{view "SearchView" placeholder="{{t 'search.root'}}" ref="search" url="/pages/search" className='home-search'  polyfill=true}}

Answer

Kevin Borders picture Kevin Borders · May 7, 2014

Update: Handlebars now supports subexpressions, so you can just do:

{{view "SearchView" (t 'search.root')}}