I am using Iron Router for my urls and I have this route:
this.route('regionEdit', { path: '/region/:_id', waitOn: function() { return Meteor.subscribe('region', this.params._id); }, data: function() { return Regions.findOne({ _id: this.params._id }); } });
This works fine when I use this path http://example.com/region/xgok3Etc5mfhtmD7j
Where xgok3Etc5mfhtmD7j is the region of _id . However, when I access http://example.com/region/whatever , the page displays fine, but without data.
How can I raise 404 error for this?
meteor iron-router
Braulio soncco
source share