My Textbox look like this..
<div class="col-md-8" ng-class="{ 'has-error' :
TicketSupportForm.TicketNo.$invalid && !TicketSupportForm.TicketNo.$pristine }">
<input type="text" ng-keyup="Autocomplete(TicketNo)" class="form-control" id="txtTicketNo" placeholder="Ticket Number"
name="TicketNo" ng-model="TicketNo" required>
</div>
Js Code Here
$scope.Autocomplete = function (id) {
debugger
$http.get("/api/TicketSupport/GetTicketIDForAutoComplete?TransID=" + id)
.success(function (data, status, headers, config) {
if (data != "") {
//console.log(data[0].TransID);
$("#txtTicketNo").autocomplete({
status: data[0].TransID
});
}
});
}
In above Code "GetTicketIDForAutoComplete" function get the data from the DB. data[0].TransID also get values.. But It shows an error "AutoComplete" is not a function
I already added js tags also
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>