Ho controllato i post correlati per ore, ma non sono riuscito a trovare la risposta giusta per risolvere il problema riscontrato.Controller Ember: nulla ha gestito l'azione
continuo a ricevere l'errore:
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.
Credo che il controllore è il trattamento delle cose sbagliate, o è zampillante per una strada sbagliata?
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);
}
});
Qualcuno sa perché questo non avrebbe funzionato?
Si prega di mostrare il modello. –