Dynamic properties in Ember.js with concat helper

Ember.js concat gives some flexibility in Handlebars. Here’s how.


{{#each objects as |object|}}
  {{comment/entry-details authorName=(concat object.firstName " " object.lastName) model=object}}
{{/each}}

You can even add a component dynamically:


{{#each objects as |object|}}
  {{component (concat modelName '/entry-details) model=object}}
{{/each}}

This way, if modelName is comment the output will be equivalent to:


{{comment/entry-details model=object}}

More info here
This protip has been written in 1016 seconds