javascript - clear a file input that is in an ng-repeat -
i have set of file inputs being generated array ng-repeat. able clear input after upload has been completed. example uploaded file @ index 1 of array. not upload complete file input associated index (1) cleared. tried binding ng-model @ first didn't work. should use $broadcast?? there way find the value of input? /// <reference path="../typings/tsd.d.ts" /> var app = angular.module("app", []); app.controller("appctrl", function($scope, $q, filefactory){ var ctrl = this; ctrl.ff = filefactory; $scope.upload = function(){ var defer = $q.defer(); defer.promise(function(data){ }) var http = new xmlhttprequest(); var formdata = new formdata(); formdata.append("file", filefactory.uploads[$scope.index].file); formdata.append("file", filefactory.uploads[$scope.index].filename); ...