xitme
Version:
AngularJS boilerplate generator
29 lines (23 loc) • 936 B
JavaScript
var @ = Class.extend({
get@: function (callback) {
this.$http.get(appConfig.appEndpointList[appConfig.activeEndpoint]['get@@model_name']).success(function (result) {
callback(result);
});
},
set@: function (@, callback) {
this.$http.post(appConfig.appEndpointList[appConfig.activeEndpoint]['set@@model_name'],@).success(function (result) {
callback(result);
});
}
});
(function () {
var @ = Class.extend({
instance: new @,
$get: ['$http', function ($http) {
this.instance.$http = $http;
return this.instance;
}]
});
angular.module('@@module_scope.@@model_nameService', [])
.provider('@@model_nameService', @);
}());