Closed jcheron closed 4 years ago
C'est modifier. Cependant j'ai toujours l'erreur:
index.js:163 Uncaught Error: Assertion Failed: You attempted to generate a link for the "projects.stories.tags.index" route, but did not pass the models required for generating its dynamic segments. There is no route named projects.stories.tags.index
J'ai mis le linkTo comme ça:
<LinkTo class="ui vertical animated green button" @route="projects.stories.tags" @model={{story.id}} style="float: right;">
J'ai la même erreur hélas.
J'ai aussi modifié le routage:
import EmberRouter from '@ember/routing/router';
import config from './config/environment';
const Router = EmberRouter.extend({
location: config.locationType,
rootURL: config.rootURL
});
Router.map(function() {
this.route('developers', function() {
this.route('new');
this.route('edit', {path: 'developer/:developer_id'});
});
this.route('projects', function() {
this.route('new');
this.route('edit', {path: 'project/:project_id'});
this.route('stories', {path: 'project/stories/:project_id'}, function() {
this.route('new');
this.route('edit', {path: 'edit/:story_id'});
this.route('tags',{path: 'tags/:story_id'} ,function(){
this.route('index',{path: 'index/:story_id'});
this.route('new',{path: 'new/:story_id'});
});
});
});
this.route('home');
});
export default Router;
Faudrait éviter de faire des routes trop complexes, la story n'a pas besoin d'être une sous route du projet (puisqu'on a son id)...
Problème résolu merci beaucoup.
https://github.com/dixplo/BigBrainsBoard-Project/blob/3dd0c60f5eb3ca71d65f18340e660cf7d97c82bf/app/routes/projects/stories/tags/index.js#L7-L19
Remplacer
param
parstory