Created
July 14, 2014 03:31
-
-
Save eaddingtonwhite/44ff35badcd9a0a223e1 to your computer and use it in GitHub Desktop.
Force angular to update scope of DOM element inside controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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