I have a simple iron-router config in my /lib/router.coffee:
Router.configure
notFoundTemplate: \"notFound\"
Router.map ->
@route \"app\",
path:
Try adding a default layoutTemplate in your call to Router.configure(). notFoundTemplate is designed to populate the yield of a main layout template, rather than serve as a replacement layoutTemplate.
What you have is an old iron-router API, in new one my last route looks like this:
Router.route('/(.*)', function() {//regex for every route, must be last
if (this.ready()) {
document.title = "404";
this.render('error');
} else this.render('loading');
})