Pablo Umald Pablo Umald - 2 months ago 8x
AngularJS Question

Call function from Directive to Controller [AngularJs]

i have an app that can will send a message with attachment.
I am using this kind of module called angular-media-preview
here is the link

screenshot 1

I have a reset button in my app. Now, I cant reset the fields of my input file type. is there any possible way to call onchange event for my input file will be reset or any work arounds?



dont mind the preview thing, I dont know why image preview is not working.


You can try something like this

<input type="file" ng-click="clear()">

In your controller:

$scope.clear = function () {