Skip to content

Instantly share code, notes, and snippets.

@whoeverest
Created October 5, 2012 13:50
Show Gist options
  • Save whoeverest/3839897 to your computer and use it in GitHub Desktop.
Save whoeverest/3839897 to your computer and use it in GitHub Desktop.
undefined projectImages
function DisplayImageCtrl($scope, $routeParams, API) {
var projectImages = null;
API.get({projectId: $routeParams.projectId}, function(data) {
projectImages = data['images'];
})
for (var i=0; i < projectImages.length; ++i) {
if (projectImages[i]['image_id'] == imageId) {
$scope.imageURL = projectImages[i]['image_url'];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment