{{#linkTo "route" model title=model.title}}model.title{{/linkTo}}
This gives the resulting a
tag a title value of "model.title". I want to iterate a list of models and output a link with a unique title for each.
Can this be done?
Based on @guleria's comment and for the sake of having this question answered I'll provide an answer.
{{#linkTo "route" model titleBinding=model.title}}model.title{{/linkTo}}
Providing Binding
as a suffix to your properties will enable bindings. As for where this is documented, here an extract of the documentation:
Properties ending in a Binding suffix will be converted to Ember.Binding instances. The value of this property should be a string representing a path to another object or a custom binding instanced created using Binding helpers.
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With