Have you tried replacing notFound:
with notFoundTemplate
? The Iron Router example uses notFound
but I could only find notFoundTemplate
in the source code and that worked for me.
Router.map(function() {
this.route('story', {
path: '/story/:_id',
data: function() {
return Stories.findOne({displayId: +this.params._id});
},
notFoundTemplate: 'storyNotFound'
});
});