title: How to to filter the array in Angular?
body: <p>When I input in the input, the ul only show the <code>li</code> which include my input. For example, if I am inputting the"Ad", then only show the "Add some todos" li. And if I give up input, the ul will go back, and all the Li will show again.  How to realize It?</p>
  
  <p>It is my code below.</p>
  
  <pre><code>&lt;body&gt;
  &lt;script src="angular.js"&gt;&lt;/script&gt;
  &lt;div ng-controller="ctr1"&gt;
      &lt;input ng-model='newTodo' type="text" ng-keyup="$event.keyCode == 13 &amp;&amp; addTodo()"&gt;
      &lt;ul&gt;
          &lt;li ng-repeat="todo in fillArray"&gt;
              &lt;span&gt;{{todo.text}}&lt;/span&gt;
              &lt;button ng-click="removeTodo($index)"&gt;X&lt;/button&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  &lt;script&gt;
  
      var app = angular.module("app",[]);
      var contrl = app.controller('ctr1',['$scope',function ($scope) {
          $scope.todos = [{text:"Add some todos"}];
          $scope.newTodo = '';
          $scope.addTodo = function () {
              var text = this.newTodo.trim();
              if(text){
                  this.todos.push(
                          {text:text}
                  );
                  this.newTodo= '';
              }
          };
          $scope.removeTodo = function (index) {
              this.todos.splice(index,1);
          };
  
          $scope.fillArray =$scope.todos.filter(function (item) {
              return (item.text.toLocaleLowerCase().indexOf($scope.newTodo) &gt; -1);});
      }]);
  
  &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>**How to get the fillArray? ** My code is wrong.</p>