var fileURL = "assets/"+scope.productDirectory+"/content1/info/"+x+".png";
imageExists(fileURL, function(exists, url) {
if(exists) {
scope.contentOneSequence.push(url);
}
});
function imageExists(url, callback) {
var img = new Image();
img.onload = function() { callback(true, url); };
img.onerror = function() { callback(false, url); };
img.src = url;
}