Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function with ngf-select inside ng-repeat not passing correct object #2121

Open
mavajih opened this issue Jun 14, 2019 · 0 comments
Open

Function with ngf-select inside ng-repeat not passing correct object #2121

mavajih opened this issue Jun 14, 2019 · 0 comments

Comments

@mavajih
Copy link

mavajih commented Jun 14, 2019

Hello

Function uploadProductPhotos($files,product) is not passing correct product when we use ngf-select inside ng-repeat, it is always pass 'product' object of index 0

HTML:

<div ng-repeat="product in products">
   <div>
       <span>product id: {{product.id}} </span>
       <label style="font-weight: normal; width: 50%; " class="linkButton" for="inputimages">Add more images for same design</label>
       <input style="display: none;" id="inputimages" type="file" ngf-select="uploadProductPhotos($files,product)" multiple ng-model="productimages" name="productimages"  ngf-accept="'image/*'" >
       | <a class="linkButton" ng-click="remove(product)">Remove Design</a>
   </div>
</div>

JS:

$scope.products = [{'id': 123, 'sku': 'test1' },{'id':124, 'sku': 'test2'}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant