javascript - How to update ng-bind-html every 1 minute? -
my project running angular js. how can update element every 1 minute?
this element
<strong ng-class="{'red-text' : main.redbgarray[$index] == 'red-text'}" ng-bind-html='main.minutestatecheck(listvieworder.status,listvieworder.ordered_at,listvieworder.accepted_at,listvieworder.ready_in_mins,$index)'/>
so function.
vm.minutestatecheck = function(status,ordered_at,accepted_at,ready_in_mins,index){ if(status === "pending"){ vm.ordersstatusredtextnum = index; var differentdayoutput = vm.differenceindays(ordered_at) if(vm.milisecondcheck > 300000){ vm.redbgarray[index] = "red-text"; } return differentdayoutput; } else if(status === "accepted"){ var differentdayoutputforaccepted = vm.differentdayoutputforaccepted(accepted_at,ready_in_mins); if(vm.milisecondcheck > 0){ vm.redbgarray[index] = "red-text"; } return differentdayoutputforaccepted; } }
so how can update element in every 1 minute?
thanks!
Comments
Post a Comment