我在jasny-boostrap的文件输入中使用AngularJS中的模式,所以我也使用了贾斯尼-自举-角。我有两个疑问:
我的HTML:
<div class="fileinput fileinput-new" data-provides="fileinput">
<div class="fileinput-preview thumbnail" style="width: 200px; height: 150px;"></div>
<div>
<span class="btn btn-primary btn-file">
<span class="fileinput-new">Select a image</span>
<span class="fileinput-exists">Change</span>
<input type="file" name="file" file-model="fileinput"> <!--compose.myFile-->
</span>
<a href="#" class="btn btn-primary fileinput-exists" data-dismiss="fileinput">Remover</a>
<button class="btn btn-info" ng-click="showInput()">Show Input</button>
</div>
</div>如果我单击“显示输入”,我可以看到图像二进制,我使用了这个angularjs:
$scope.showInput = function () {
console.log($scope.fileinput.result);
}我使用这个HTML代码和我的angularjs一起来查看来自web服务的图像,这一切都是完美的:
<!-- Foto view-->
<div class="form-group">
<img ng-show="equipamento.FotoEquipamento != null" style="height:auto; width:225px;" data-ng-src="{{getImage(equipamento.FotoEquipamento)}}" />
</div>发布于 2016-12-19 11:44:13
https://stackoverflow.com/questions/41194842
复制相似问题