国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

angular.js - ng-file-upload 如何實(shí)現(xiàn)多圖片上傳
phpcn_u1582
phpcn_u1582 2017-05-15 17:04:39
0
3
948

ng-file-upload 如何實(shí)現(xiàn)多圖片上傳?

我的代碼:
html:

<p class="row photos">
                        <p class="col-xs-2 pt" ng-repeat="f in detailImgs" style="font:smaller">
                            {{f.name}}
                              <img
                              ngf-src="f.file"
                              ngf-resize="{width: 40, height: 40, quality: 0.9}" 
                              ngf-no-object-url="true or false"
                            >
                        </p>
                        <p class="col-xs-2 pt upload">
                            
                            <i class="ion-plus-round"></i>
                            <p class="button" ngf-select ng-model="detailImgs" ngf-multiple="true">Select</p>
                        </p>
                    </p>

javascript:

$scope.detailImgs = [];

這樣寫的話,還是單圖片,不能上傳多張。點(diǎn)擊上傳會(huì)把之前傳的那張圖片去掉了。

ng-file-upload地址:https://github.com/danialfarid/ng-file-upload#usage
ng-file-upload給的地址:http://jsfiddle.net/danialfarid/2vq88rfs/136/

補(bǔ)充我寫的代碼,html部分稍微改了下。關(guān)鍵部位沒有修改。


phpcn_u1582
phpcn_u1582

全部回復(fù)(3)
迷茫

我一字不差的按照官方給的都可以啊
http://jsfiddle.net/danialfar...
或許你是其他配置錯(cuò)了,有更詳細(xì)的代碼嗎?
另外

ngf-src="f"

不需要加上.file

迷茫

自己寫個(gè)例子:
https://github.com/hjzheng/CU...

代碼:
https://github.com/hjzheng/CU...

views目錄的index.ejs頁面有ng-file-upload的用法

npm install
bower install
npm start
淡淡煙草味

請(qǐng)問一下 用這個(gè)插件怎么進(jìn)行壓縮圖片呢?

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板