We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If I'm using a route with two titles defined by a function, the data context is incorrect for the parent route, when navigating to the child route.
Example:
this.route('/projects/:_projectId/', { name: 'project', data: function(){ /*get project from projects collection*/ }, title: function(){ return this.data().projectTitle; } }); this.route('/projects/:_projectId/:_taskId', { name: 'task', data: function(){ /*get task from tasks collection*/ }, title: function(){ return this.data().taskTitle; }, parent: 'project' });
When navigating to /projects/projectId the title of the project title is correctly displayed by the breadcrumb.
When navigating to /projects/projectId/taskId, I only see the title of the task, when I'd expect to see Project Title / Task Title
The text was updated successfully, but these errors were encountered:
My current work around is to not use the this.data() method and instead use a collection lookup in the title function.
this.data()
this.route('/projects/:_projectId/', { name: 'project', data: function(){ return Projects.findOne({_id: this.params.taskId}); }, title: function(){ /*return this.data().projectTitle;*/ return Projects.findOne({_id: this.params.taskId}).projectTitle; } }); this.route('/projects/:_projectId/:_taskId', { name: 'task', data: function(){ return Tasks.findOne({_id: this.params.taskId}); }, title: function(){ /*return this.data().taskTitle;*/ return Tasks.findOne({_id: this.params.taskId}).taskTitle; }, parent: 'project' });
Sorry, something went wrong.
No branches or pull requests
If I'm using a route with two titles defined by a function, the data context is incorrect for the parent route, when navigating to the child route.
Example:
When navigating to /projects/projectId the title of the project title is correctly displayed by the breadcrumb.
When navigating to /projects/projectId/taskId, I only see the title of the task, when I'd expect to see Project Title / Task Title
The text was updated successfully, but these errors were encountered: