Skip to content

Commit

Permalink
Demo updated
Browse files Browse the repository at this point in the history
  • Loading branch information
juanpablob committed Apr 23, 2017
1 parent 3cd588e commit 286685f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions demo/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ angular.module('acme', ['environment']).
},
vars: {
development: {
apiUrl: '//localhost/api',
staticUrl: '//localhost/static'
apiUrl: '//api.acme.dev.local/v1',
staticUrl: '//static.acme.dev.local'
// antoherCustomVar: ''
},
production: {
Expand All @@ -21,9 +21,13 @@ angular.module('acme', ['environment']).
// antoherCustomVar: ''
},
test: {
apiUrl: '//api.acme.dev.test/v1',
staticUrl: '//static.acme.test.prod'
// apiUrl: '//api.acme.dev.test/v1',
staticUrl: '//static.acme.dev.test'
// antoherCustomVar: ''
},
defaults: {
apiUrl: '//api.default.com/v1',
staticUrl: '//static.default.com/'
}
}
});
Expand All @@ -34,5 +38,8 @@ angular.module('acme', ['environment']).
}).
controller('Pages', ['$scope', 'envService', function($scope, envService) {
$scope.environment = envService.get(); // store the current environment
$scope.vars = envService.read('all');
$scope.vars = envService.read();
$scope.ble = envService.read('pico');
console.log('sin argumento devuelve: ' + $scope.vars);
console.log('variable no existente devuelve: ' + $scope.ble);
}]);

0 comments on commit 286685f

Please sign in to comment.