Can the output of a function be directly included in HTML markup? For example:
<p> Days difference: {{compareDays(task.dueDate)}} </p>
This is the function being used:
public compareDays(date: Date): string {
let oneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds
let diffDays = Math.round(Math.abs((date.getTime() - this.today.getTime()) / (oneDay)));
return diffDays.toString();
}