jeudi 25 décembre 2014

Ember.js How to bind isSelected class to the clicked view?

I have some views which will expand and show details when clicked.


For now, all the views can be clicked and expand, but the question is


How to expand only the latest clicked view?


For example, when I clicked view #1, it expand. So when I clicked view #2, the view #1 will collapse and view #2 expand etc.


I know we can bind a isSelected classname to the clicked view, but how do we tell the view to check "If any other view is selected" ?


Do we use CollectionView ? But how?


FYI this is the working JSBin.





Aucun commentaire:

Enregistrer un commentaire