Permalink
Browse files

Clear errors after 3 seconds.

chapter9-3
  • Loading branch information...
tmeasday committed Apr 8, 2013
1 parent 816d381 commit c9af05eca81f18b0d9a7396f759a897de3d46efd
Showing with 7 additions and 0 deletions.
  1. +7 −0 client/templates/includes/errors.js
@@ -2,4 +2,11 @@ Template.errors.helpers({
errors: function() {
return Errors.find();
}
+});
+
+Template.error.onRendered(function() {
+ var error = this.data;
+ Meteor.setTimeout(function () {
+ Errors.remove(error._id);
+ }, 3000);
});

0 comments on commit c9af05e

Please sign in to comment.