How to clear the autocomplete textbox field after clicking on a value from the dropdown in angularjs
$scope.hide = true;
//$scope.fnamePicked = false;
$scope.mydata = null;
$scope.total = null;
$scope.Search = function () {
$scope.fnamePicked = true;
debugger;
$http.get(apiUrl + "/api/Warehouse/GetCastingDetails?PARTID=" + $scope.Selectinvoice.originalObject.PARTID + "")
.then(function (response) {
debugger;
$scope.mydata = JSON.parse(response.data);
$scope.InvoiceNo = $scope.mydata[0].InvoiceNo;
$scope.InvoiceDate = $scope.mydata[0].InvoiceDate;
$scope.PartName = $scope.mydata[0].PartName;
$scope.InvoiceQty = $scope.mydata[0].InvoiceQty;
$scope.IssuedQty = $scope.mydata[0].IssuedQty;
$scope.Stock = $scope.mydata[0].Stock;
$scope.Rejected = $scope.mydata[0].Rejected;
$scope.hide = false;
});
$http.get(apiUrl + "/api/Warehouse/GetCastingwiseTotal?PARTID=" + $scope.Selectinvoice.originalObject.PARTID + "")
.then(function (response) {
$scope.total = JSON.parse(response.data);
$scope.totalAccepted = $scope.total[0].TotalAccepted;
$scope.totalIssued = $scope.total[0].TotalIssued;
$scope.totalStock = $scope.total[0].TotalStock;
$scope.totalRejected = $scope.total[0].TotalRejected;
$scope.hide = false;
});
}
<angucomplete-alt id="txtinvnumber"
placeholder="Search Part Name/No"
pause="100"
selected-object="Selectinvoice"
remote-url=apiUrl + "/api/Warehouse/GetCastingwiseInvoices"
remote-url-data-field=""
local-data="warehouse"
search-fields="PARTNAME"
title-field="PARTNAME"
minlength="1"
input-class="form-control mr-sm-2"
match-class="highlight"
ng-click="Search()"></angucomplete-alt>