Service Angular

nomiservApp.factory('catalogoService',['$http', function($http) { var urlApi = '/api/principal/'; return { get_clase_riesgo: function(params) { return $http.get(urlApi+'catalogos/riesgos/', {params : params}).then(function(result) { return result.data; }); }, get_periocidad_pago: function(params) { return $http.get(urlApi+'catalogos/pagos/', {params : params}).then(function(result) { return result.data; }); }, }; }]);
Service solo para metodo get utilizando cuaquier Api Rest.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.