Commit 92219b0dd96c63321c68c1d021802c6f71b66bba
1 parent
2be6d09901
Exists in
master
Seleccion de imagen
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
package.json
src/js/ngFileModel-directive.js
1 | 1 | angular.module('focaDirectivas') |
2 | - .directive('ngFileModel', ['$parse', function ($parse) { | |
2 | + .directive('ngFileModel', ['$parse', function ($compile) { | |
3 | 3 | return { |
4 | 4 | restrict: 'A', |
5 | 5 | link: function (scope, element, attrs) { |
6 | - var model = $parse(attrs.ngFileModel); | |
6 | + var model = $compile(attrs.ngFileModel); | |
7 | 7 | var isMultiple = attrs.multiple; |
8 | 8 | var modelSetter = model.assign; |
9 | 9 | element.bind('change', function () { |
... | ... | @@ -28,7 +28,7 @@ angular.module('focaDirectivas') |
28 | 28 | })); |
29 | 29 | }); |
30 | 30 | |
31 | - Promise.all(promesas).then(function(values){ | |
31 | + Promise.all(promesas).then(function(values) { | |
32 | 32 | scope.$apply(function () { |
33 | 33 | if (isMultiple) { |
34 | 34 | modelSetter(scope, values); |