Answer the question
In order to leave comments, you need to log in
AngularJS, event handling on API status change?
I have an api that can issue statuses, for example, "closed", "open", how can I track the status change in real time, for example, transfer this status and when it changes, an event occurs, for example, brought liveday, it works on onclick and sends the number of days in the argument, but I need the reverse action, the mb startGame function which takes closed and open, and throws out the download to the user, or, in general, some kind of html
$scope.liveDay = function (days) {
if (!$scope.process) {
$scope.process = true;
gameService.live(days, $scope.status,
function (result) {
$scope.process = false;
$scope.status = result;
draw(false);
}, function () {
$scope.process = false;
});
}
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question