I have data and I list the data using ng-repeat. Each row has a browse image. My problem is when I browse image, the image displays in all row which should not. It should display to the one row. Please Help.
Here is my fiddle link: http://jsfiddle.net/DharkRoses/m2qagzzk/2/
Sample codes in fiddle:
angular.module('test', []);
angular.module('test') .controller('UploadCtrl', function ($scope, $timeout) {
$scope.thumbnail = {
dataUrl: 'adsfas'
};
$scope.fileReaderSupported = window.FileReader != null;
$scope.photoChanged = function (files) {
if (files != null) {
var file = files[0];
if ($scope.fileReaderSupported && file.type.indexOf('image') > -1) {
$timeout(function () {
var fileReader = new FileReader();
fileReader.readAsDataURL(file);
fileReader.onload = function (e) {
$timeout(function () {
$scope.thumbnail.dataUrl = e.target.result;
});
}
});
}
}