When the button is clicked, a div
containing <li>
elements with images is created. The function being used is as follows:
<button data-ng-click="createWorkOrder()">Post project</button>
Function:
$scope.createWorkOrder = function () {
//API call to retrieve data
$scope.myPromise = operationsFactory.readWorkOrders().success(function (response) {
$scope.workOrdersList = response.result;
})
};
Html:
<ul>
<li dir-paginate="wd in workOrdersList | filter: search.status | filter: search.name | itemsPerPage: 10">
<a href="">
<h4>{{wd.name}}</h4>
</a>
<p>Status: {{wd.status}}</p>
</li>
</ul>
Although the list is being generated, it requires a page refresh to be visible. I would like it to be displayed automatically once new data is fetched by the above function.