i'm trying to show the difference between now and a date using moment into my ionic app.
This is what i'm trying:
controller
this.getElapsedTime = function(){
return moment(moment(new Date()).diff(moment(this.user.date))).format("HH:mm:ss");
};
view
<span class="footer-title">Tempo trascorso: {{myCtrl.getElapsedTime()}}</span>
My problem is that date will automatically update view just for a second and then it doesn't change.
How can i tell to angular to update always the view?