0

I'am trying to clear an input with img scr base64 after submit action called, but it's not clear the input! my html:

<div class="form-group">
    <label>Photo</label>
    <input mds-file type="file" file="mealData.img" base64="y" required>
    <img src="{{y}}" style="display: block;margin: auto">
</div>

my controllers:

$scope.y="";
$scope.$apply();
georgeawg
  • 48,608
  • 13
  • 72
  • 95
  • Keep in mind that in most places (controllers, services) `$apply` has already been called for you by the directive which is handling the event. An explicit call to `$apply` is needed only when implementing custom event callbacks, or when working with third-party library callbacks. – georgeawg Feb 11 '20 at 00:59
  • Does this answer help? -- [How can I clear an HTML file input with JavaScript?](https://stackoverflow.com/questions/1703228/how-can-i-clear-an-html-file-input-with-javascript#24608023) – georgeawg Feb 11 '20 at 02:08

0 Answers0