У меня проблема с отображением ранее загруженных изображений в моем приложении.
this.profiles.filepath //value of this varible is {0: "/uploads/Restaurants/profile/1544420574509-5yg9t54cjphw4u25.jpeg", 1: "/uploads/Restaurants/profile/1544420574509-5yg9t54cjphw4u26.jpeg", 2: "/uploads/Restaurants/profile/1544420574509-5yg9t54cjphw4u27.jpeg"}
for (let i in this.profiles.filepath) {
this.uploadedImages.push(this.uri + "" + this.profiles.filepath[i]);
}
this.restImage = [
"http://localhost:4000/uploads/Restaurants/profile/1544420574509-5yg9t54cjphw4u25.jpeg",
"http://localhost:4000/uploads/Restaurants/profile/1544420574509-5yg9t54cjphw4u26.jpeg",
"http://localhost:4000/uploads/Restaurants/profile/1544420574509-5yg9t54cjphw4u27.jpeg"
];
Это мой код JavaScript в файле componentet.ts, ниже приведен HTML-тег для загрузки файла.
<image-upload [preview]="true" [uploadedFiles]='uploadedImages' [max]="10" (uploadFinished)="onSelectFile($event)" (removed)="onRemoved($event)"></image-upload>
когда я пишу restImage
в html-теге вместо uploadedImages
, он показывает предварительный просмотр, но в случае uploadedImages
он ничего не показывает.в журнале консоли обе переменные имеют одинаковое значение.Я не могу найти ни одной проблемы.Кто-нибудь может мне помочь?
заранее спасибо.