Reputation: 11
I used setInteval to update my variable $scope.labelText on per second in controller.js, but the label binding this variable can not be refreshed synchronously. Is there a way to trigger a refresh?
Upvotes: 0
Views: 124
Reputation: 2730
You can use $scope.apply
as follow
$scope.$apply(function () {
$scope.labelText = "new value";
});
Upvotes: 1