Commit 628ec131b5c102c28e67a478b01d7fd50b4aba45

Authored by Luigi
1 parent cc1b095a10
Exists in master

Subir fotos

src/js/controller.js
... ... @@ -11,14 +11,14 @@ angular.module('focaModalDetalles')
11 11  
12 12 $scope.mobile = APP === 'cobranza';
13 13 $scope.detalles = parametros;
14   - $scope.newFiles = {};
  14 + $scope.files = [];
15 15  
16   - $scope.$watch('newFiles.files', function() {
17   - $scope.newFiles.files.forEach(function(file) {
  16 + $scope.$watch('files', function() {
  17 + $scope.files.forEach(function(file) {
18 18 $scope.detalles.files.push(file);
19 19 });
20 20 validarExtSize();
21   - });
  21 + }, true);
22 22  
23 23 $scope.eliminarImg = function(key) {
24 24 $scope.detalles.files.splice(key, 1);
src/views/modal-detalles.html
... ... @@ -48,7 +48,7 @@
48 48 <label class=" btn btn-outline-debo" ng-if="!mobile">
49 49 <input
50 50 type="file"
51   - ng-file-model="newFiles.files"
  51 + ng-file-model="$parent.files"
52 52 multiple
53 53 accept=".jpg,.png">
54 54 <small>Elegir Archivos </small>