We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 222a37e commit 44b2a75Copy full SHA for 44b2a75
1 file changed
src/app.vue
@@ -13,6 +13,11 @@
13
<a v-on="click:remove(todo)">[x]</a>
14
</li>
15
</ul>
16
+ <div v-show="todos.length">
17
+ <strong>
18
+ {{ remaining }} {{ remaining | pluralize 'item' }} remaining
19
+ </strong>
20
+ </div>
21
</template>
22
23
<script>
@@ -22,6 +27,10 @@ export default {
27
input: ''
28
},
24
29
30
+ computed: {
31
+ remaining() { return this.todos.filter(todo => !todo.completed).length; }
32
+ },
33
+
25
34
methods: {
26
35
add() {
36
var value = this.input.trim();
0 commit comments