Skip to content
Permalink
Browse files

Added not found template

chapter5-4
  • Loading branch information
tmeasday committed Oct 19, 2015
1 parent 7b9264d commit 04bfa8e217f518f32b8a0ec2fa9d1e3a283ea00f
Showing with 9 additions and 0 deletions.
  1. +6 −0 client/templates/application/not_found.html
  2. +3 −0 lib/router.js
@@ -0,0 +1,6 @@
<template name="notFound">
<div class="not-found page jumbotron">
<h2>404</h2>
<p>Sorry, we couldn't find a page at this address.</p>
</div>
</template>
@@ -1,6 +1,7 @@
Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'loading',
notFoundTemplate: 'notFound',
waitOn: function() { return Meteor.subscribe('posts'); }
});

@@ -10,3 +11,5 @@ Router.route('/posts/:_id', {
name: 'postPage',
data: function() { return Posts.findOne(this.params._id); }
});

Router.onBeforeAction('dataNotFound', {only: 'postPage'});

0 comments on commit 04bfa8e

Please sign in to comment.
You can’t perform that action at this time.