jeudi 19 novembre 2015

How to bind action only under certain condition [Ember.js]

I just want to know, is there some way I can achieve the below purpose. NOTE: I know the code below will not work. It's only for purpose illustration. <button {{if publishable (action "publish")}}>Publish</button> Of course, it can be done in action method. I just think it could keep code drier if it can be done in template.




Aucun commentaire:

Enregistrer un commentaire