parent
12a2a78c76
commit
4c623532d7
@ -1,25 +1,21 @@ |
||||
|
||||
angular.module('openproject.hal') |
||||
|
||||
.factory('HALAPIResource', function HALAPIResource() { |
||||
.factory('HALAPIResource', ['$q', function HALAPIResource($q) { |
||||
'use strict'; |
||||
|
||||
var HALAPIResource = { |
||||
configure: function() { |
||||
Hyperagent.configure('ajax', function ajax(options) { |
||||
// options.dataType = "json";
|
||||
|
||||
return jQuery.ajax(options); |
||||
}); |
||||
Hyperagent.configure('defer', $q.defer); |
||||
}, |
||||
|
||||
setup: function(uri) { |
||||
HALAPIResource.configure(); |
||||
return new Hyperagent.Resource({ |
||||
url: 'http://opapi.apiary-mock.com/' + uri, |
||||
});
|
||||
});
|
||||
} |
||||
} |
||||
|
||||
return HALAPIResource; |
||||
}); |
||||
}]); |
Loading…
Reference in new issue