jeudi 2 juillet 2015

filter a list with a action event emberjs

I have a list of items been show as default. I create a side menu with buttons hat can filter my model according to the status. I want to be able to filter by id and name when I click the tabs. Thank you in advance

<li {{action 'showName'}} {{bind-attr class=":showName :allNameTab allTabIsActive:active"}}>
   <a href="#">
         Id 
   </a>
</li>

<li {{action 'showId'}} {{bind-attr class=":showId :allIdTab allTabIsActive:active"}}>
    <a href="#">
         name
    </a>
    </li>

controller

showName: function(){
    this.send('resetTabs');
    this.send('ShowName');
},




Aucun commentaire:

Enregistrer un commentaire