title: AngularJS show only filtered elements on ng-repeat
body: <p>I've got a simple ng-repeat with a simple search filter. </p>
  
  <p>My question is how can i show elements of this list only if filter is set ?? </p>
  
  <p><strong>I want the list be empty when the search input contains no value !!</strong></p>
  
  <p>I can't get it work, all the items are displayed if search is filter.</p>
  
  <p>Here the html : </p>
  
  <pre><code>&lt;input type="search" class="form-control" placeholder="Rechercher" data-ng-model="search" /&gt;
  
  &lt;div data-ng-repeat="departement in departements | filter:search"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here departements objects ! </p>
  
  <pre><code>$scope.depatements = [
      {"codeDept": "01", "libelleDept": "D1", "libelleRegion":"R1", "codeRegion": "04"},
      {"codeDept": "02", "libelleDept": "D2", "libelleRegion":"R2", "codeRegion": "08"},
      {"codeDept": "03", "libelleDept": "D3", "libelleRegion":"R3", "codeRegion":"09"}
  ];
  </code></pre>
  
  <p>Really thx to you guys.</p>