Created
June 21, 2016 20:50
-
-
Save mcabreradev/40a3a5eedac911d84ac8be0c0ffe7c21 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* App | |
* ============= | |
* | |
* */ | |
angular | |
.module('app.service') | |
.factory('RestangularCache', ['Restangular', '$cacheFactory', function(Restangular, $cacheFactory) { | |
return Restangular.withConfig(function(RestangularConfigurer) { | |
RestangularConfigurer.setDefaultHttpFields({cache: true}); | |
}); | |
}]); | |
/** | |
* PropertyService Service | |
* ============= | |
* @ngdoc service | |
* @name main. | |
* @description Se utiliza para crear metodos que solo se utilizaran en una app principal | |
* | |
* */ | |
angular | |
.module('app.service') | |
.service('Property', ['$http', '_', function ($http, _) { | |
var property = {}; | |
this.set = function (name, value) { | |
return property.name = value; | |
}; | |
this.get = function (name) { | |
return property.name; | |
}; | |
this.getAll = function (name) { | |
return property; | |
}; | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment