Commit c693d2155eb09263c42c031194f7e0519d61c493
1 parent
39618cc3b5
Exists in
master
identación
Showing
1 changed file
with
12 additions
and
10 deletions
Show diff stats
src/js/service.js
| 1 | angular.module('appWrapperDemo') | 1 | angular.module('appWrapperDemo') |
| 2 | .factory('API_ENDPOINT', [ | 2 | .factory('API_ENDPOINT', [ |
| 3 | '$http', | 3 | '$http', |
| 4 | '$localStorage', | 4 | '$localStorage', |
| 5 | 'ENDPOINT_BASE', | 5 | 'ENDPOINT_BASE', |
| 6 | function($http, $localStorage, ENDPOINT_BASE) { | 6 | function($http, $localStorage, ENDPOINT_BASE) { |
| 7 | var direccion = ENDPOINT_BASE; | 7 | |
| 8 | return { | 8 | var direccion = ENDPOINT_BASE; |
| 9 | URL: $localStorage.urlEndPoint, | 9 | |
| 10 | setUrl: function(url) { | 10 | return { |
| 11 | this.URL = url; | 11 | URL: $localStorage.urlEndPoint, |
| 12 | $localStorage.urlEndPoint = url; | 12 | setUrl: function(url) { |
| 13 | }, | 13 | this.URL = url; |
| 14 | getUrl: function() { | 14 | $localStorage.urlEndPoint = url; |
| 15 | return $http.get(direccion + '/terminal/consultar'); | 15 | }, |
| 16 | } | 16 | getUrl: function() { |
| 17 | return $http.get(direccion + '/terminal/consultar'); | ||
| 18 | } | ||
| 17 | }; | 19 | }; |
| 18 | }]); | 20 | }]); |
| 19 | 21 |