$ scope. $ применить

$scope.$apply(function () {

    // Add $scope.myVariableHere = value

});
Distinct Dragonfly