mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
17 lines
641 B
JavaScript
17 lines
641 B
JavaScript
angular.module('resources.networks',['services.helperfunctions', 'services.requester']);
|
|
angular.module('resources.networks').factory('Networks', ['$http', 'Network', 'makeArray', 'requester', function($http, Network, makeArray, requester){
|
|
this.fetch = function(){
|
|
return requester.get('listNetworks').then(function(response){
|
|
return response.data.listnetworksresponse.network;
|
|
}).then(makeArray(Network));
|
|
};
|
|
return this;
|
|
}]);
|
|
|
|
angular.module('resources.networks').factory('Network', function(){
|
|
var Network = function(attrs){
|
|
angular.extend(this, attrs);
|
|
};
|
|
return Network;
|
|
});
|