Skip to content

Instantly share code, notes, and snippets.

@hogedigo
Created October 27, 2014 05:34
Show Gist options
  • Save hogedigo/cc93ecadc73394c20ec2 to your computer and use it in GitHub Desktop.
Save hogedigo/cc93ecadc73394c20ec2 to your computer and use it in GitHub Desktop.
access scope outside component.
function test() {
var scope = angular.element(document.getElementById('test')).scope();
scope.$apply(function() {
scope.test = 'this is test!!!';
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment