Advertisement
Guest User

Untitled

a guest
Mar 27th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. angular
  2. .module('myApp', [
  3. ...
  4. ])
  5. .run(
  6. [ '$rootScope', '$http',
  7. function ($rootScope, $http) {
  8.  
  9. $http.get('config/config.json').success(function(data) {
  10. $rootScope.config = data;
  11. });
  12.  
  13.  
  14. }
  15. ]
  16. )
  17.  
  18. angular.module('myApp')
  19. .controller('MainCtrl', function ($rootScope) {
  20. console.log($rootScope, $rootScope.config);
  21. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement