How to make a refresh only in a "ng-binding" and not in the page, to get the current date via angularJS?
I have the following code:
function updateTime() {
scope.time = new Date();
}
But I need to do a refresh, so that it is synchronized with the clock, that is: Whenever I update the minute, in my html it also updates.
<span>{{time|date: 'hh:mm a'}}</span>
I saw something about $interval
but so far I did not succeed, if someone can explain how to use it, or another way to get the same result, I'm grateful.