I have a dynamic iron route with the template explicitly set, however iron router attempts to render the path instead of the template.
http://localhost:3000/blog/example-post
Couldn't find a template named "Blog:permalink" or "blog:permalink". Are you sure you defined it?
Router.route('/blog/:permalink'), {
template: 'blogPost',
name: 'blogPost',
path: '/blog/:permalink',
data: function () {
return Blogs.findOne({ permalink: this.params.permalink, published: true });
}
}
Router.route('blog'), {
path: '/blog',
waitOn: function () {
return [
Meteor.subscribe('blogs')
]
}
}
You closed route
)
without adding there the options object ( see,
after)
). That's whyiron:router
tries to generate template name from path:Should be: