aping
Version:
apiNG is an AngularJS directive that enables you to receive, aggregate, limit, order and display data from one or more sources. The complete setup is dead simple, just by adding data-attributes to your html
29 lines (23 loc) • 684 B
JavaScript
;
angular.module('jtt_aping').service('apingInputObjects', ['apingDefaultSettings', function (apingDefaultSettings) {
/**
* * return new clean apiNG input object by _type and _params
*
* @param _type {String}
* @param _params {Object}
* @returns {Object}
*/
this.getNew = function (_type, _params) {
var inputObject = {};
switch (_type) {
case 'request':
inputObject = angular.extend({
model: apingDefaultSettings.model
}, _params);
break;
default:
break;
}
return inputObject;
}
}]);