-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(API Service): change the name of the file and the service
- Loading branch information
1 parent
b96c216
commit 287de22
Showing
3 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
'use strict'; | ||
|
||
angular.module('webApp') | ||
.service('API', ['$resource', function ApiDownloadModules($resource) { | ||
|
||
/*var url = '/policy/all';*/ | ||
/*var url = '/template/inputs';*/ | ||
var url = '/fragment/input'; | ||
|
||
var methods = { | ||
'get' : {method:'GET', isArray:true} | ||
}; | ||
|
||
var resource = $resource(url,{},methods); | ||
|
||
return resource; | ||
|
||
/* | ||
this.getInputData = function() { | ||
var vm = th | ||
var url = '/policy/all'; | ||
var url = '/template/inputs'; | ||
var url = '/fragment/input'; | ||
var methods = { | ||
'get' : {method:'GET', isArray:true} | ||
}; | ||
var resource = $resource(url,{},methods); | ||
vm.resource = resource.query(); | ||
vm.resource.$promise.then(function (result) { | ||
vm.inputsData = result; | ||
console.log(vm.inputsData); | ||
return vm.inputsData; | ||
}); | ||
}; | ||
*/ | ||
|
||
}]); |