I have a simple function that returns me the value as number. This value basically how many items in a todolist is incomplete.
testFunction() {
var a = 0;
this.todos.forEach(function(elem, i) {
if(elem.status === true) {
a += 1;
}
})
console.log(a); // gives correct length
}
Now in view I have
Total todo Items Left <span>{{a}}</span> //Nothing coming here?
How do I log the value of a
in template