For example:
<img src="{{profile.avatar}}"/>
Do I really have to create a helper for this or is it possible to write the attribute string
For example:
<img src="{{profile.avatar}}"/>
Do I really have to create a helper for this or is it possible to write the attribute string
For Ember newcomers (whom came to this question by Googleling for example), since Ember 1.11 and later, you should write:
Just as OP wrote in his question!
Note: Since Ember 1.13 the
bind-attr
helper has been deprecated.You use the
bind-attr
-helper for this.bindAttr
will also work but is deprecated since 1.0 RC8 as pointed out by intuitivepixel.More info is available in their guide.