Skip to content

Instantly share code, notes, and snippets.

@valmirphp
Created November 10, 2014 02:11
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 valmirphp/b44333715c4588d34b4e to your computer and use it in GitHub Desktop.
Save valmirphp/b44333715c4588d34b4e to your computer and use it in GitHub Desktop.
get scope angular
var sidebar = document.getElementsByTagName('body');
var scope = angular.element(sidebar).scope();
var rootScope = scope.$root;
scope.$apply(function(){
rootScope.$broadcast('loadMap');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment