我刚开始学习AngularJS。我想在模态弹出窗口中显示文件。我可以显示图像文件,但现在我想在该弹出窗口中显示exl / csv / pdf文件。
查看
<div class="col-sm-6">
<div class="form-group" >
<ul>
<li ng-repeat="image in upFiles">
<img class="img img-thumbnail center-block" ng-src="{{IMAGE_LOCATION+image}}" />{{image}}
//csv/exl/pdf here
</li>
</div>
</div>
JS
$scope.viewFile = function(document_id, emp_id) {
loadData('viewUpload', {
document_id: document_id,
emp_id: emp_id
}).success(function(data) {
$scope.upFiles = data;
//console.log($scope.upFiles);
$scope.IMAGE_LOCATION = base_url + 'application/assets/uploads/' + emp_id + '/' + document_id + '/';
});
}
$ scope.upFiles 仅包含文件名 例如:[&#34; name1.jpg&#34;,&#34; name2.jpg&#34;,&#34; name3.csv&#34;]