blob: d762dc9c5e7bee47488afe5792920c0e6427c392 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
appDS2.factory('SampleService', function ($http, $q) {
return {
getCollaborateList: function() {
return $http.get('get_collaborate_list')
.then(function(response) {
if (typeof response.data === 'object') {
return response.data;
} else {
return $q.reject(response.data);
}
}, function(response) {
// something went wrong
return $q.reject(response.data);
});
},
}
});
|