I'm trying to retrieve a value from a model from another page in the model()
function of a route. This works fine when I look up the record by ID:
self.store.find('page', 1).then(function(page) {
self.controllerFor('edit').set('title', page.get('text'));
});
However, when I try to use a query to get this, I get a Error: Assertion Failed: Error: More context objects were passed than there are dynamic segments for the route: error
message from line 14261 of ember.js.
Here's the code that causes the issue:
self.store.find('page', { section: params.section }).then(function(page) {
self.controllerFor('edit').set('title', page.objectAt(0).get('text'));
});
I've ensured that the model has the section property and that params.section is being set properly from the route. What would be causing the error?
Aucun commentaire:
Enregistrer un commentaire