当没有使用angular文件上传指令上传的文件时

When there is no file uploaded using angular-file-upload directive?

本文关键字:文件 指令 angular      更新时间:2023-09-26

我使用https://github.com/nervgh/angular-file-upload我想检查什么时候没有上传文件,比如:

<p ng-show="!uploader.queue">empty</p>

uploader.queue是一个数组,!uploader.queue[]不起作用。正确的语法是什么?

好的,我咬一口。

<p ng-show="!uploader.queue.length">empty</p>

请参阅https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length