Im trying to output html with angular js. I know the html is going to be ok. This is what im trying now:
<div class="items-list" id="items-container">
<div ng-repeat="data in ItemsData track by $index" ng-bind-html='ItemsData'>
<-data->
</div>
</div>
And this is what i pretty much am doing with the data
$.ajax({
method: "POST",
url: "{{URL::route('items')}}",
data: filteringData,
dataType: 'json'
}
).done(function (response) {
$scope.ItemsData = $sce.trustAsHtml(response['items']);
$scope.ItemsPage += 1;
$scope.ItemsLastPage = response['lastPage'];
$scope.ItemsLoaderBusy = false;
});
But this is not working. Im trying to do this for a long time.
Pretty much what I want is that I get a response from the server. It has 'items'. Its an array of elements that are html. How could I output them with a repeat?
And I really dont know what im doing. Thanks for help.