Binding custom attributes on the Ember screen with controller data in xhandlebars script

{{#each App.SampleViewController}} {{#view App.SampleView contentBinding="this" sort-date="content.sortDate" name="content.name"}} <a href="#" onclick="App.loadSampleDetails(this);" {{bindAttr id="content.id"}}> {{/view}} {{/each}} 

How to add custom attributes / general attributes (for example, in the above examples of sort-date / name attributes) to the view element from the xhandlebars script tag, I know that using the Bindings attributes we can add, but I have dynamic data coming from the controller through every.

0
source share
1 answer

You can use the attributeBindings property to specify additional attributes that will be added to the DOM output for presentation. See the HTML Attributes section of the Ember.View docs: http://docs.emberjs.com/#doc=Ember.View&src=false

+1
source

All Articles