Skip to content

Commit

Permalink
Added get code to ConfigService and updated config to json
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Regan committed Nov 15, 2015
1 parent 8f722e5 commit 18e0fb0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
3 changes: 2 additions & 1 deletion project_information.txt
Expand Up @@ -71,5 +71,6 @@ Change History:
/* COMPLETED STEP 1 */

15_11_15_01_01_000: Started prep to convert to Angular
15_11_15_01_01_000: Added get code to ConfigService and updated config to json

cd ~/cscie32/DRRrrRrvrr; git status; git commit -a -m "Started source"; git push origin master; git status
cd ~/cscie32/DRRrrRrvrr; git status; git commit -a -m "Started prep to convert to Angular"; git push origin master; git status
21 changes: 21 additions & 0 deletions src/js/ConfigService.js
@@ -0,0 +1,21 @@
angular.module('DRRrrRrvrr')
.service('ConfigService', ['$http', function( $http ){

var svc = this;
svc.CLIENT_ID = '';
svc.SCOPES = '';

svc.get = function( callback ) {
$http.get('/js/config.js', {}).then(function(response){
names.list = response.data;
console.log(response);
console.log(response.data);
if(callback){
callback();
}
}, function(response){
console.log(response);
});
};

}]);
2 changes: 1 addition & 1 deletion src/js/GoogleService.js
@@ -1,5 +1,5 @@
angular.module('DRRrrRrvrr')
.service('GoogleDriveService', ['$http', 'users', function($http, users){
.service('GoogleDriveService', ['$http', 'ConfigService', function($http, ConfigService){

var svc = this;

Expand Down

0 comments on commit 18e0fb0

Please sign in to comment.