Ich habe stundenlang verwandte Beiträge durchgesehen, konnte aber nicht die richtige Antwort finden, um das Problem zu beheben, das ich habe.Ember-Controller: Nichts hat die Aktion behandelt
Ich erhalte die Fehlermeldung:
Uncaught Error: Nothing handled the action 'edit'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.
Ich denke, dass die Steuerung Dinge falsch Handhabung, oder es brodelt auf einen falschen Weg nach oben?
App.EventDetailsController = Ember.ObjectController.extend({
isEditing: false,
actions: {
edit: function() {
this.set('isEditing', true);
},
doneEditing: function() {
this.set('isEditing', false);
}
}
});
App = Ember.Application.create();
App.Router.map(function() {
// put your routes here
this.route('events', {path: '/events'});
this.route('createevent', {path: '/createevent'});
this.route('eventdetails', {path: ':eventdetails_id'});
});
App.EventsRoute = Ember.Route.extend({
model: function() {
return events;
}
});
App.EventDetailsRoute = Ember.Route.extend({
model: function(params) {
return events.findBy('id', params.eventdetails_id);
}
});
Weiß jemand, warum das nicht funktionieren würde?
Bitte Vorlage zeigen. –