Skip to content

Instantly share code, notes, and snippets.

@eaddingtonwhite
Created July 14, 2014 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eaddingtonwhite/44ff35badcd9a0a223e1 to your computer and use it in GitHub Desktop.
Save eaddingtonwhite/44ff35badcd9a0a223e1 to your computer and use it in GitHub Desktop.
Force angular to update scope of DOM element inside controller
var scope = angular.element($('#elementToUpdate')).scope();
scope.$apply(function() {
scope.variable1 = $scope.variable1;
scope.variable2 = $scope.variable2;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment