Pablo Umald Pablo Umald - 1 year ago 104
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.

Answer Source

You can try something like this

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

In your controller:

$scope.clear = function () {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download