Browse Source

Commit 8.4: Add incompleteCount helper to body.

Frederic G. MARAND 8 năm trước cách đây
mục cha
commit
7b0bfc8e7c
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  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;
     }
   });