function Imgfile (file) {
var reader = new FileReader ();
$scope. Guid = (new Date ()). valueof (); Creates a random number with a timestamp, using the
reader.onload = function (ev) {
$scope. $apply (function () {
$scope. Thumb.push ( Ev.target.result);
};
Reader.readasdataurl (file); FileReader, turn the picture into Base64
}
$scope. img_upload = function (files) {for
(var img=0;img< Files.length img++) {
$scope. Imgfilesdata.push (files[img]);
Imgfile (files[img]);
}
;
Page
<!--Photos -->
<div>
<section>
<div>
<div ng-repeat="item in thumb">
<!-- Use the angular loop method to display the images stored in the thumb -->
<label>
<img ng-src="{{item}}" class="float-left padding-left-8" width="70px" height="70px"/>
</label>
</div>
<div >
<div class="float-left" >
<input type="file" id="one-input" accept="image/*" multiple="multiple" file-model="images" style=";z-index: 99999 ;margin-left: -70px; Height: 70px;width: 70px;opacity: 0 " onchange="angular.element(this).scope().img_upload(this.files)"/>
<div class="width-70 height-70 float-left margin-left-5 line-height-70 background-e5 text-center" >
<i class="ion-image font-size-20 color-888"></i>
</div>
</div>
</div>
</div>
</section>
</div>