title: Ng-controller ng-model not working in angular js
body: <p>I'm newbie in angular JS.
  I have already follow the instructions.</p>
  
  <p>First I'm using ng-init directive to search data. I still using static data for this case. Before I jump into combining it with laravel. I need to know the basic function in angular.</p>
  
  <p>Everything run smooth. But when i change it into ng-controller, and access static data from scope, all i got is error. </p>
  
  <p>This is my source code :</p>
  
  <p>html :</p>
  
  <pre><code>&lt;div ng-controller="DataPeople"&gt;
      &lt;input type='text' ng-model="search" &gt;
      &lt;ul&gt;
          &lt;li ng-repeat="lon in listofname | filter:search"&gt;
        name : {{ lon.name }} |  city : {{ lon.city }}
      &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>javascript :</p>
  
  <pre><code>function DataPeople($scope) {
      $scope.listofname = [
                              {name:'guta', city:'tangerang selatan'}, 
                              {name:'john', city:'jakarta utara'}, 
                              {name: 'oki', city:'singapura'}, 
                              {name: 'billy', city:'singapura'}, 
                              {name: 'george', city:'bandung'}
                              ];
  
  }
  </code></pre>
  
  <blockquote>
    <p>Uncaught SyntaxError: Unexpected token :
    <a href="http://errors.angularjs.org/1.5.0/ng/areq?p0=DataPeople&amp;p1=not%20a%20function%2C%20got%20undefined" rel="nofollow">http://errors.angularjs.org/1.5.0/ng/areq?p0=DataPeople&amp;p1=not%20a%20function%2C%20got%20undefined</a></p>
  </blockquote>
  
  <p>ohya this up on my fiddle too. <a href="http://jsfiddle.net/dq8r196v/3/" rel="nofollow">http://jsfiddle.net/dq8r196v/3/</a> </p>
  
  <p>Hope you guys can help me.</p>
  
  <p>Thanks a lot.</p>