title: How to get the autocomplete in angular js?
body: <p>I have a object which contains name and id.I just want to do the autocomplete based on name.I have tried the code as shown below </p>
  
  <pre><code>//Js file
  var app=angular.module("myapp",[]);
  app.controller("controller",['$scope',function($scope){
      $scope.persons=[
                      {
              Name:"Bhavani",
              Id:67
      },
      {
          Name:"Mamata",
          Id:66
      },
      {
          Name:"Prasanna",
          Id:65
      },
      {
          Name:"Ramya",
          Id:64
      },
      {
          Name:"Navya",
          Id:63
      }
      ];
      $scope.complete=function(){
          $("#autocomp").autocomplete({
              source: $scope.persons.Id
          });
      };
  }]);
  </code></pre>
  
  <p>//Html file</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app="myapp"&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;title&gt;Auto Complete based on name&lt;/title&gt;
  &lt;script src="angularfiles/angular.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"&gt;&lt;/script&gt;
  &lt;script src="Jsfiles/autocomp.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body ng-controller="controller"&gt;
      &lt;div ng-repeat="p in persons"&gt;{{p.Name}}
      &lt;/div&gt;
       &lt;div class="ui-widget"&gt;
      &lt;input type="text" id="autocomp" ng-keyup="complete()"&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The above code may have some errors .Its not getting output which i want to have .Can anyone help me out to solve this problem.</p>