I am trying to use Emberjs components. And I stumbled into trouble with actions.
Here my component:
export default Ember.Component.extend({
actions: {
openObject: function (id) {
this.sendAction('openObject', id);
}
},
...
And here my controller, also I have created the same action in the route.
export default Ember.Controller.extend(
{
actions: {
openObject: function (id) {
self.transitionToRoute('objects.bc', id);
}
}
}
);
And what I need is just to make transition by action from component.
And it is work only if I connect controller action and component action this way:
{{bc-table openObject="openObject"}}
Is there some way to send action from component to router/controller without such connection?
Aucun commentaire:
Enregistrer un commentaire