Open aliwebsd opened 7 years ago
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); });
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); });