xitme
Version:
AngularJS boilerplate generator
21 lines (15 loc) • 709 B
JavaScript
var @ = function($http) {
this.$http = $http;
this.get@ = function (callback) {
this.$http.get(appConfig.appEndpointList[appConfig.activeEndpoint]['get@@model_name']).success(function (result) {
callback(result);
});
};
this.set@ = function (@, callback) {
this.$http.post(appConfig.appEndpointList[appConfig.activeEndpoint]['set@@model_name'],@).success(function (result) {
callback(result);
});
};
});
angular.module('@@module_scope.@@model_nameService', [])
.service('@@model_nameService', ['$http',@]);