0
如果用戶未設置配置文件圖像,並且如果用戶將鼠標移至接近的位置,如何設置懸停在本地文件中,我需要從我的本地文件設置默認圖像用於設置圖像的配置文件圖片字段。如何顯示默認圖像,如果未在angularjs中設置配置文件圖像
我的HTML:
<div class="col-lg-2 vheight1">
<h4>Profile Picture</h4>
<div class="fileinput fileinput-new" onclick='$("#my_profile_pic").click();'>
<div class="fileinput-preview thumbnail" data-provides="fileinput" data-trigger="fileinput" id="profile_pic">
<img ng-if="source" class="thumb" ng-src="{{source}}"/>
</div>
<!-- <div class="hidden-sm hidden-md hidden-lg hidden-xs">
<span>
<span class="fileinput-new" ng-show="!hasFile()">Select image</span>
<span class="fileinput-new" ng-show="hasFile()">Change</span>
</span>
<a href="#" class="btn btn-danger fileinput-new glyphicon glyphicon-trash" data-dismiss="fileinput" ng-show="hasFile()" ng-click="removefile(json, file)" ></a>
</div> -->
</div>
</div>
<input type="file" class="hidden hidden-sm hidden-md hidden-lg hidden-xs" id='my_profile_pic' file-model="photo">
誰能請幫助我。
它不顯示任何它只是顯示了同樣的白色背景。我是否需要使用導航欄來突出顯示選擇。 –
奇怪的是它不起作用。你能爲我提供一個Plunker,這樣我可以幫助你更多嗎? – Mistalis