jeudi 8 septembre 2016

Ember 2 action sent to route instead of component

In my app I've defined this component:

// components/buy-functions.js
export default Ember.Mixin.create({
    actions: {
        openModal: function() {
            $('#buyModal').openModal();
        }
    }
});

then in the route's template:

<h5>Buy form</h5>

    <div class="btn" >Buy</div>


(the component does not have a template)

But when i click the button I get the error "nothing handled the "openModal" action... Can someone explain what I'm doing wrong here?




Aucun commentaire:

Enregistrer un commentaire