as html page
<div class="posts" ng-repeat="s in news" ng-init="moreNews()">
{{s.news}}
</div>
<input type="button" value="get data" onclick="moreNews()"/>
at controller
$scope.moreNews = function () {
$http.get("test?p=" + $scope.pno)
.then(function (response) {
console.log(response);
$scope.news = response.data.news;
$scope.pno++;
}, function (data) {
alert("Oops! Unable to get data from server")
});
};
Here I am getting data from server and showing to html page. Here first response is showin data properly. but for second response it is overriding the data I want to add next data to below the first one and so one.
How to append lists below the existing data?