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

TypeError: Cannot read property 'addRemoteFile' of undefined #62

Open
aliwebsd opened this issue Jan 17, 2017 · 1 comment
Open

TypeError: Cannot read property 'addRemoteFile' of undefined #62

aliwebsd opened this issue Jan 17, 2017 · 1 comment

Comments

@aliwebsd
Copy link

aliwebsd commented Jan 17, 2017

View:
<lf-ng-md-file-input name="files00" lf-files="vm.files" lf-api="vm.addRemoteFilesApi" lf-option="optoin08" lf-drag-and-drop-label="تصاویر را اینجا بندازید (بکشید و اینجا رها کنید)" lf-placeholder="تصاویر انتخاب شده" lf-browse-label="انتخاب تصاویر" lf-remove-label="حذف همه" lf-maxcount="20" lf-filesize="10MB" lf-totalsize="20MB" lf-mimetype="image/*" accept="image/*" multiple drag preview></lf-ng-md-file-input>

Controller:
storeService.details({storeId: $stateParams.id}).then(function (res) { vm.store = res.data.storeDetails; $timeout( angular.forEach('vm.store.pictures', function (item, key) { vm.addRemoteFilesApi.addRemoteFile(item.url, item.name, 'image'); }) )}, function (res) { console.log('error: ', res.statusText); });

@sagar-mi
Copy link

sagar-mi commented Sep 29, 2017

pass it like this

storeService.details({storeId: $stateParams.id}).then(function (res) { vm.store = res.data.storeDetails; $timeout( angular.forEach('vm.store.pictures', function (item, key) { $scope.addRemoteFilesApi.addRemoteFile(item.url, item.name, 'image'); }) )}, function (res) { console.log('error: ', res.statusText); });

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

2 participants