Преглед на файлове

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 () {
       var ret = Session.get("hideCompleted");
       return ret;
+    },
+
+    incompleteCount: function () {
+      var ret = Tasks.find({ checked: { $ne: true }}).count();
+      return ret;
     }
   });