Is there a way to refresh virtual repeat container?
<p>I've got a <code>md-virtual-repeat-container</code> that handles the data from an API call triggered by a search box. I'd like to be able to refresh this container when a user enters a <em>second</em> search query.</p>

<p>I'm using a setup similar to this <a href="http://plnkr.co/edit/e32qVQ4ECZBleWq2Gb2O?p=preview" rel="nofollow noreferrer">plnkr</a> which is from <a href="https://stackoverflow.com/questions/33759185/material-angular-infinite-scroll-with-http-request">this question:</a>. The only difference is its getting data from a server when the user enters a search term.</p>

<h2>My Question</h2>

<p>Is there a way to trigger a refresh an <code>md-virtual-repeat-container</code>?</p>

<hr>

<p>I don't think the code is relevant but here's my (simplified) production code:</p>

<pre><code>    var self = this;
    self.infiniteItems = {
        numLoaded_: 0,
        toLoad_: 0,
        items: [],
        getItemAtIndex: function (index) {
        if (index &gt; this.numLoaded_) {
            this.fetchMoreItems_(index);
                return null;
            }
            return this.items[index];
         },
         getLength: function() {
            return this.numLoaded_ + 25;
         },
         fetchMoreItems_: function (index) { 
             if (this.toLoad_ &lt; index) {
                 this.toLoad_ += 5;
                 var offset = 0;

                 $http({
                     method: 'GET',
                     datatype: 'json',
                     url: '{my-api-call}',
                     contentType: "application/json; charset=utf-8",
                     cache: false,
                     params: {
                         param: query,
                         page: offset
                     }
                  }).then(angular.bind(this, function (obj) {
                     this.items = this.items.concat(obj.data.SearchResults);
                     this.numLoaded_ = this.toLoad_;
                     this.offset++;
                     $scope.searchResults = obj.data.SearchResults;
                  }));
             } 
         }
    };
</code></pre>