Skip to content

Instantly share code, notes, and snippets.

@eupharis
Last active December 24, 2015 10:59
Show Gist options
  • Save eupharis/6787359 to your computer and use it in GitHub Desktop.
Save eupharis/6787359 to your computer and use it in GitHub Desktop.
Angular $rootScope in run method
var renderer2 = angular.module('pak', ['pak.filters', 'pak.services',...]);
renderer2.run(['$rootScope', function($rootScope) {
$rootScope.some_function = function() {
console.log('HELLO WORLD!!!!');
};
// function is available in all CHILD SCOPES
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment