Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

like ng-change on fileinput #64

Open
gtreimun opened this issue Jan 24, 2017 · 4 comments
Open

like ng-change on fileinput #64

gtreimun opened this issue Jan 24, 2017 · 4 comments

Comments

@gtreimun
Copy link

Hi! I am trying to detect when the input state changes, for example when it is undefined or when it has an image, something like "ng-change", is there any function like this?
Thanks for your time.

@hmziqrs
Copy link

hmziqrs commented Feb 2, 2017

+1

@rainabba
Copy link

For now, you can just use $watch against your $scope variable defined with the lf-files attribute (I watch the .length property of that object).

@Fl4v10
Copy link

Fl4v10 commented Apr 11, 2017

I got the same problem here, I cant watch the $scope.files

@rainabba
Copy link

$scope.$watch('files.length',function(newVal,oldVal){
   if ( $scope.files && $scope.files[0] && $scope.files[0].lfFileName) {
      // files has changed and has a valid entry to act on
   }
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants