Here's what I currently have (I've also tried numerous things from other SO answers and tutorials to no avail):
simpleImageReview.js:
var app = angular.module("simpleImageReview", ['ui.bootstrap']);
imgViewerCtrl.js:
app.controller("imgViewerCtrl", function($scope, $http) {
$scope.imgList = [];
$http.get("http://127.0.0.1:5000/api/file_metadata").success(
function(data, status, headers, config) {
$scope.data = data;
$scope.totalImgs = $scope.data.num_results;
$scope.totalPages = $scope.data.total_pages;
$scope.currentPage = $scope.data.page;
$scope.imgList = $scope.data.objects;
$scope.imgsPerPage = 10;
});
});
index.html (stripped down):
... header, imports, etc. - no issues with this
<body ng-app="simpleImageReview">
<div ng-controller="imgViewerCtrl">
<ul>
<li>
<li ng-repeat="img in imgList">
<img src="{{img.local_path}}" border="0" width="153" height="204">
</li>
</ul>
<pagination
total-items="totalImgs"
items-per-page="imgsPerPage"
ng-model="currentPage"
max-size="totalPages"
class="pagination-sm"
boundary-links="true">
</pagination>
</div>
</body>
... footer, more imports - no issues with this
The images display fine so the API is working as intended. Clicking on the next page does nothing. I imagine I somehow need to update the view but am not sure how to go about this.
What am I doing wrong?