samedi 25 mars 2017

how to call action of route from component?

i have button in component

<button type="button" class="btn btn-sm btn-default" >GO</button>

Now i have written this action applyDateFilter in component.js like this

applyDateFilter() {
            var variable = this.get('dateFilter');
            this.sendAction('testAction2');
        }

Now i have another action in main route.js file

testAction2: function(){
            alert('test');
        }

Now i want to call this route action from applyDateFilter action so how can i do this.I am using ember js version 2.10. Thanks




Aucun commentaire:

Enregistrer un commentaire