Using AngularJS to get JSON file:
{
"albumId": 1,
"id": 1,
"title": "accusamus beatae ad facilis cum similique qui sunt",
"url": "http://placehold.it/600/92c952",
"thumbnailUrl": "http://placehold.it/150/92c952"
},
and display using ng-repeat:
<div ng-repeat="image in images" class="col-xs-2 ">
<div class="thumbnail">
<img src="{{ image.thumbnailUrl }}" alt="" ng-click="open()" />
</div>
</div>
That works. Than I've connected the ui.bootstrap to thumbnails to get modal window opened.
controller:
app.controller("page3Ctrl",['$scope', '$resource', '$uibModal', function ($scope, $resource,$uibModal) {
var postingsResource = $resource('http://jsonplaceholder.typicode.com/photos', {});
$scope.images = postingsResource.query();
$scope.open = function() {
var uibModalInstance = $uibModal.open({
animation: true,
templateUrl: 'modal.html'
});
};
}]);
Works fine. Now, how can I possibly go about displaying the particular image in modal url from thumbnailUrl? They should match.