lundi 11 janvier 2016

Using this.sendAction() in components?

I am using Ember 2.

When writing components I used to propagate events from the component to the route (or whatever embeds the component) with this.sendAction(…). I checked out the docs lately and discovered that they advise another approach. http://ift.tt/1PSyCNN

this.get('action')();

Since Ember is known to be very opinionated I want to stick as much to the best practices as possible. But I am not sure if the docs might be out of date or the tutorials using sendActions are.

So I would like what is the way to do this?

Aucun commentaire:

Enregistrer un commentaire