Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular
- .module('myApp', [
- ...
- ])
- .run(
- [ '$rootScope', '$http',
- function ($rootScope, $http) {
- $http.get('config/config.json').success(function(data) {
- $rootScope.config = data;
- });
- }
- ]
- )
- angular.module('myApp')
- .controller('MainCtrl', function ($rootScope) {
- console.log($rootScope, $rootScope.config);
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement