How Do I Change An AngularJS Variable I Declared In $scope Using Annyang Speech Commands?
I have a simple speech recognition app that starts and pauses a video based on speech commands. My problem is that a variable that I declare in $scope does not change when I give t
Solution 1:
just simply put $scope.$digest
in your pause callback:
'pause': function() {
$scope.vid.pause();
$scope.playtime = 10;
$scope.$digest();
}
so angular will know something has changed when you are tried to change $scope
variable outside angular's working area.
hope that helps
Post a Comment for "How Do I Change An AngularJS Variable I Declared In $scope Using Annyang Speech Commands?"