var m1 = angular.module('myApp',[]); m1.run(['$rootScope',function($rootScope){ $rootScope.name = 'hello'; }]);