Browse Source

Commit 8.4: Add incompleteCount helper to body.

Frederic G. MARAND 8 years ago
parent
commit
7b0bfc8e7c
1 changed files with 5 additions and 0 deletions
  1. 5 0
      simple-todos.js

+ 5 - 0
simple-todos.js

@@ -14,6 +14,11 @@ if (Meteor.isClient) {
     hideCompleted: function () {
       var ret = Session.get("hideCompleted");
       return ret;
+    },
+
+    incompleteCount: function () {
+      var ret = Tasks.find({ checked: { $ne: true }}).count();
+      return ret;
     }
   });