I have an error when I try to get to URL "/posts" in my Ember app. I get a following error:
Uncaught Error: More context objects were passed than there are dynamic segments for the route: posts.index
Which is really puzzling, because there is no dynamic segment for index, my routes look like this:
Router.map(function() {
this.route('posts', function() {
this.route('new');
this.route('show', {
path: ':post_id'
});
});
});
part of the model:
let Post = DS.Model.extend({
title: DS.attr('string'),
author: DS.attr('string'),
content: DS.attr('string')
});
My link which I use to get to /posts:
{{link-to 'Posts' 'posts'}}
Additional info: I am using ember-cli-cordova, so my environment.js contains "defaultLocationType: 'auto'" and I am also using fixtures, so I have a following adapter:
export default DS.FixtureAdapter.extend({
host: config.apiUrl
});
Does anybody see any problem which would cause the error? Thank you in advance.
Aucun commentaire:
Enregistrer un commentaire