Commit 5868f79d1eaf90be3ae5eeb5dbbd67d01a698326
1 parent
99d02b55e2
Exists in
master
and in
1 other branch
Modifiqué formato de fecha.
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
src/js/osm-directive.js
| ... | ... | @@ -7,7 +7,7 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 7 | 7 | scope.map = L.map(contenedor).setView([attrs.latitud, attrs.longitud], attrs.zoom); |
| 8 | 8 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(scope.map); |
| 9 | 9 | }, |
| 10 | - controller: ['$scope', function($scope) { | |
| 10 | + controller: ['$scope', '$filter', function($scope, $filter) { | |
| 11 | 11 | $scope.$watch('marcadores', function(valorNuevo) { |
| 12 | 12 | marcadores = $scope.marcadores; |
| 13 | 13 | mapa = $scope.map; |
| ... | ... | @@ -15,7 +15,8 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 15 | 15 | L.marker([marcador.latitud, marcador.longitud]).addTo($scope.map) |
| 16 | 16 | .bindPopup( |
| 17 | 17 | "Actividad: " + marcador.actividad + '<br/>' + |
| 18 | - 'Fecha: ' + marcador.fecha | |
| 18 | + 'Fecha: ' + $filter('date')(marcador.fecha.slice(0,10), 'dd/MM/yyyy') + | |
| 19 | + ' ' + marcador.fecha.slice(11,19) | |
| 19 | 20 | ).openPopup(); |
| 20 | 21 | }); |
| 21 | 22 | }); |