Tuesday 15 September 2015

javascript - Emberjs how to bind-attr an id -



javascript - Emberjs how to bind-attr an id -

i want utilize ember properties toggle visibility of div calling it's dynamic id, though can similar calling classes, cannot same id's.

for example: {{bind-attr class=":class1 controller.controllerproperty:class2"}} works fine. can toggle controllerproperty action in controller.

you think same concept apply id's. {{bind-attr id=":staticid controllerproperty:id{{dynamicidnumber}}"}} makes id's disappear together!

why happening , right method doing sort of this? avoid work-around solutions much possible.

binding classes special case in ember described in here binding other attributes properties described here

javascript jquery ember.js handlebars.js

No comments:

Post a Comment