How to load more data in ng-repeat if there’s not enough?

I have a filter in ng-repeat and ng-if condition and there almost always will be less then 10 results per page (10 results is what I get from API).

My idea is that in js file should be a cycle with condition

First we declare variable so we can check the length

           var numberOfArticlesOnPage = container.children.length
           console.log(numberOfArticlesOnPage)

           for (i = 0; numberOfArticlesOnPage < 10); i++ {
               $scope.pageNumber = $scope.pageNumber + 1
               var i=1
               i++
               $http(
                   {
                       method: 'GET',
                       url: 

//Here I put i instead of page number so it loads next page and every time we create results[i] with new number in the end

'https://api.nytimes.com/svc/search/v2/articlesearch.json?fq=news_desk:("Politics")&page=' + i + '&api-key=groQeNemKAhk7QjDWircgauo5jYVcwez', /* Most recent */
                   }).then(function successCallback(result) {
                       $scope.results[i] = result.data.response.docs;
                   }, function errorCallback(result) {
                       console.log("there's a error, man...");
                   });
                //Check the length again
                   var container = document.querySelector(".container");
                   var numberOfArticlesOnPage = container.children.length```

//And that is the template where it should be shown

```<div class="container">
           <div class="box" ng-repeat="result in results | filter : '!trump'" ng-if="result.multimedia[2].url != null">
               <h2>{{result.headline.main}}</h2>
               <p class="abstract">{{result.abstract}}</p>
               <img src="https://static01.nyt.com/{{result.multimedia[0].url}}">
               <p></p>
               <a ui-sref="article ({
               articleSlug:'{{result.headline.main | slugify}}', 
               title: '{{result.headline.main}}',
               url: '{{result.web_url}}', 
               image: 'https://static01.nyt.com/{{result.multimedia[0].url}}',
               externalUrl: '{{result.url}}'
               })">Read more...</a>
           </div>
       </div>```


//But I don't know how to write a code in the template so it can take more data?

Source: New feed
Source Url How to load more data in ng-repeat if there’s not enough?