title: AngularJS remove empty value
body: <p><strong>What I'm trying to achieve:</strong><br/>
  List each value from an array without displaying the empty (Null) value.</p>
  
  <p>e.g Item #1, Item #1, Item #2</p>
  
  <p><strong>Current Problems:</strong>
  I've tried several filters todo this task, but I can't remove the empty list item (see diagram).</p>
  
  <p>Thank you in advance for any assistance/help. </p>
  
  <p><strong>Controller JS:</strong></p>
  
  <pre><code>$scope.array = ["Item #1","Item #1","","","","Item #2"];
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;md-list&gt;
      &lt;md-list-item class="md-3-line" ng-repeat="item in array track by $index"&gt;
          &lt;div class="md-list-item-text"&gt;
              &lt;p&gt;{{item}}&lt;/p&gt;
          &lt;/div&gt;
          &lt;md-divider ng-if="!$last"&gt;&lt;/md-divider&gt;
      &lt;/md-list-item&gt;
  &lt;/md-list&gt;
  </code></pre>
  
  <p><strong>Visual:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/tpsVz.png" rel="noreferrer"><img src="https://i.stack.imgur.com/tpsVz.png" alt="enter image description here"></a></p>