0

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>

1 Answer 1

2

Check this one,

[http://jsfiddle.net/sebmade/swfjT/light/][1]

In Material design you can create stylish autocomplete textbox https://material.angularjs.org/latest/demo/autocomplete

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.