فهرست منبع

Commit 8.4: Add incompleteCount helper to body.

Frederic G. MARAND 8 سال پیش
والد
کامیت
7b0bfc8e7c
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      simple-todos.js

+ 5 - 0
simple-todos.js

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